peer: add conditional sends on quit within readHandler message dispatch

This commit is contained in:
Olaoluwa Osuntokun committed 2017-09-27 20:18:29 -07:00
1 parent c06b82c3a2
commit ab25b636f5
1 file changed
+10 -2
+10 -2
View File
@@ -641,9 +641,17 @@ out:
p.server.fundingMgr.processFundingLocked(msg, p.addr)
case *lnwire.Shutdown:
p.shutdownChanReqs <- msg
select {
case p.shutdownChanReqs <- msg:
case <-p.quit:
break out
}
case *lnwire.ClosingSigned:
p.closingSignedChanReqs <- msg
select {
case p.closingSignedChanReqs <- msg:
case <-p.quit:
break out
}
case *lnwire.Error:
p.server.fundingMgr.processFundingError(msg, p.addr)