grpc bug fixes

main
KeeganForelight 2 years ago
parent d183250fbf
commit 4d91819206

@ -57,10 +57,10 @@ func (r *ReactorManager) ReactorStatusHandler(ctx context.Context, req *pb.React
//go r.PingReset()
fmt.Printf("Recieved ping from %v!\n", req.GetId())
for _, dev := range req.GetDevices() {
d := &DeviceInfo{Id: int(dev.GetAddr()), Type: dev.GetType(), Status: dev.GetStatus(), Data: dev.GetData()}
d := &DeviceInfo{Id: int(dev.GetAddr()), Type: dev.GetName(), Status: dev.GetStatus(), Data: dev.GetData()}
go r.UpdateDevice(d)
}
return &pb.ReactorStatusResponse{Id: uint32(r.Id)}, nil
return &pb.ReactorStatusResponse{Id: int32(r.Id)}, nil
}
func (r *ReactorManager) UpdateDevice(d *DeviceInfo) {

Loading…
Cancel
Save