mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
htlcswitch: close the updateFeeTimer properly
This commit is contained in:
@ -516,7 +516,14 @@ func (l *channelLink) Stop() {
|
||||
l.cfg.ChainEvents.Cancel()
|
||||
}
|
||||
|
||||
l.updateFeeTimer.Stop()
|
||||
// Ensure the channel for the timer is drained.
|
||||
if !l.updateFeeTimer.Stop() {
|
||||
select {
|
||||
case <-l.updateFeeTimer.C:
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
l.hodlQueue.Stop()
|
||||
|
||||
close(l.quit)
|
||||
|
Reference in New Issue
Block a user