From 71d32b2f3d122c74162e2a2fa3a5438575305dd9 Mon Sep 17 00:00:00 2001 From: vyzo Date: Fri, 12 Oct 2018 12:22:26 +0300 Subject: [PATCH] fix missing reset on write errors --- comm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/comm.go b/comm.go index fded9a8..e640222 100644 --- a/comm.go +++ b/comm.go @@ -86,6 +86,7 @@ func (p *PubSub) handleSendingMessages(ctx context.Context, s inet.Stream, outgo case p.peerDead <- s.Conn().RemotePeer(): case <-ctx.Done(): } + return } case <-ctx.Done(): return