fixed wrong message size, again

This commit is contained in:
2017-12-12 20:15:34 +01:00
parent c2952093ea
commit 521cbdcb50

View File

@@ -69,7 +69,7 @@ func (daemon *LedDaemon) receive() {
log.Debugf("[%s] Read %d bytes, first protobuf is %d long", daemon.name, length, msgLen)
backendMsg := &ledd.BackendWrapperMessage{}
err = proto.Unmarshal(message[4:msgLen], backendMsg)
err = proto.Unmarshal(message[4:msgLen+4], backendMsg)
if err != nil {
log.Warningf("[%s] Couldn't decode protobuf msg!", daemon.name)
continue