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:
parent
d72255bce3
commit
2c81f61616
1 changed files with 2 additions and 0 deletions
2
peer.go
2
peer.go
|
@ -1239,6 +1239,8 @@ cleanup:
|
||||||
if msg.doneChan != nil {
|
if msg.doneChan != nil {
|
||||||
msg.doneChan <- false
|
msg.doneChan <- false
|
||||||
}
|
}
|
||||||
|
case <-p.outputInvChan:
|
||||||
|
// Just drain channel
|
||||||
default:
|
default:
|
||||||
break cleanup
|
break cleanup
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue