From 2c81f616162755935c0fb81d89d0a6c43c565a44 Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Tue, 17 Dec 2013 15:51:37 +0000 Subject: [PATCH] Also drain the inv channel as well as the message channel on peer quit. Shold prevent a deadlock where we exit but server/blockmaanger is waiting on our inv channel. Closes #62 --- peer.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/peer.go b/peer.go index 4defb51d..bb25bc07 100644 --- a/peer.go +++ b/peer.go @@ -1239,6 +1239,8 @@ cleanup: if msg.doneChan != nil { msg.doneChan <- false } + case <-p.outputInvChan: + // Just drain channel default: break cleanup }