mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
htlcswitch: fix HandleChannelUpdate by selecting on link's quit chan
This commit is contained in:
parent
7a3b3c89c2
commit
53fa13bc29
@ -2743,6 +2743,15 @@ func (l *channelLink) handleSwitchPacket(pkt *htlcPacket) error {
|
||||
//
|
||||
// NOTE: Part of the ChannelLink interface.
|
||||
func (l *channelLink) HandleChannelUpdate(message lnwire.Message) {
|
||||
select {
|
||||
case <-l.quit:
|
||||
// Return early if the link is already in the process of
|
||||
// quitting. It doesn't make sense to hand the message to the
|
||||
// mailbox here.
|
||||
return
|
||||
default:
|
||||
}
|
||||
|
||||
l.mailBox.AddMessage(message)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user