diff --git a/pkg/network/tcp_peer.go b/pkg/network/tcp_peer.go index 6de3abe74..72e80aefe 100644 --- a/pkg/network/tcp_peer.go +++ b/pkg/network/tcp_peer.go @@ -250,6 +250,16 @@ func (p *TCPPeer) handleQueues() { p2pSkipCounter++ } p.Disconnect(err) +drainloop: + for { + select { + case <-p.hpSendQ: + case <-p.p2pSendQ: + case <-p.sendQ: + default: + break drainloop + } + } } // StartProtocol starts a long running background loop that interacts