Skip to content

Commit

Permalink
Also drain the inv channel as well as the message channel on peer quit.
Browse files Browse the repository at this point in the history
Shold prevent a deadlock where we exit but server/blockmaanger is
waiting on our inv channel.

Closes #62
  • Loading branch information
Owain G. Ainsworth committed Dec 17, 2013
1 parent d72255b commit 2c81f61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,8 @@ cleanup:
if msg.doneChan != nil {
msg.doneChan <- false
}
case <-p.outputInvChan:
// Just drain channel
default:
break cleanup
}
Expand Down

0 comments on commit 2c81f61

Please sign in to comment.