diff --git a/comm.go b/comm.go index b313943e..2dee9b2e 100644 --- a/comm.go +++ b/comm.go @@ -77,6 +77,9 @@ func (p *PubSub) handleNewStream(s network.Stream) { return } + if len(msgbytes) == 0 { + continue + } rpc := new(RPC) err = rpc.Unmarshal(msgbytes)