peer: add conditional sends on quit within readHandler message dispatch
This commit is contained in:
parent
c06b82c3a2
commit
ab25b636f5
12
peer.go
12
peer.go
@ -641,9 +641,17 @@ out:
|
|||||||
p.server.fundingMgr.processFundingLocked(msg, p.addr)
|
p.server.fundingMgr.processFundingLocked(msg, p.addr)
|
||||||
|
|
||||||
case *lnwire.Shutdown:
|
case *lnwire.Shutdown:
|
||||||
p.shutdownChanReqs <- msg
|
select {
|
||||||
|
case p.shutdownChanReqs <- msg:
|
||||||
|
case <-p.quit:
|
||||||
|
break out
|
||||||
|
}
|
||||||
case *lnwire.ClosingSigned:
|
case *lnwire.ClosingSigned:
|
||||||
p.closingSignedChanReqs <- msg
|
select {
|
||||||
|
case p.closingSignedChanReqs <- msg:
|
||||||
|
case <-p.quit:
|
||||||
|
break out
|
||||||
|
}
|
||||||
|
|
||||||
case *lnwire.Error:
|
case *lnwire.Error:
|
||||||
p.server.fundingMgr.processFundingError(msg, p.addr)
|
p.server.fundingMgr.processFundingError(msg, p.addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user