diff --git a/comm.go b/comm.go index 5657abb..7b68fd5 100644 --- a/comm.go +++ b/comm.go @@ -26,6 +26,10 @@ func (p *PubSub) getHelloPacket() *RPC { } func (p *PubSub) handleNewStream(s inet.Stream) { + defer func() { + p.peerDead <- s.Conn().RemotePeer() + }() + r := ggio.NewDelimitedReader(s, 1<<20) for { rpc := new(RPC)