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
This commit is contained in:
Owain G. Ainsworth 2013-12-17 15:51:37 +00:00
parent d72255bce3
commit 2c81f61616

View file

@ -1239,6 +1239,8 @@ cleanup:
if msg.doneChan != nil {
msg.doneChan <- false
}
case <-p.outputInvChan:
// Just drain channel
default:
break cleanup
}