Skip to content
Snippets Groups Projects

Process response overhaul

Merged Ghost User requested to merge process-response-overhaul into develop
4 files
+ 8
5
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 4
1
@@ -2,6 +2,7 @@ package server
import (
"context"
log "github.com/sirupsen/logrus"
"time"
cpb "code.fbi.h-da.de/cocsn/api/go/gosdn/csbi"
@@ -17,13 +18,15 @@ type csbi struct {
func (s csbi) Hello(ctx context.Context, syn *cpb.Syn) (*cpb.Ack, error) {
ch, err := pndc.PendingChannels(nucleus.FromString(syn.Id))
if err != nil {
return nil, status.Errorf(codes.Aborted, "%v", err)
log.Error(err)
return nil, status.Errorf(codes.Aborted, "pending channel %v", err)
}
ch <- nucleus.DeviceDetails{
ID: syn.Id,
Address: syn.Address,
}
details := <- ch
log.Infof("ack to csbi %v", syn.Id)
return &cpb.Ack{
Timestamp: time.Now().UnixNano(),
TransportOption: details.TransportOption,
Loading