mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +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.
|
// NOTE: Part of the ChannelLink interface.
|
||||||
func (l *channelLink) HandleChannelUpdate(message lnwire.Message) {
|
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)
|
l.mailBox.AddMessage(message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user