peer: allow msgStream goroutines to quit within the apply function
In this commit, we thread through the quit of the peer to the execution of the apply function for a msgStream. This change ensures that if the target is still processing the message, then the peer is able to exit cleanly and not block insensately.
This commit is contained in:
parent
0b5a403fce
commit
33c5c9661e
4
peer.go
4
peer.go
@ -836,7 +836,9 @@ func newChanMsgStream(p *peer, cid lnwire.ChannelID) *msgStream {
|
||||
// to the other side, they immediately send a
|
||||
// channel update message, but we haven't yet
|
||||
// sent the channel to the channelManager.
|
||||
p.server.fundingMgr.waitUntilChannelOpen(cid)
|
||||
p.server.fundingMgr.waitUntilChannelOpen(
|
||||
cid, p.quit,
|
||||
)
|
||||
}
|
||||
|
||||
// TODO(roasbeef): only wait if not chan sync
|
||||
|
Loading…
Reference in New Issue
Block a user