mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-28 22:32:34 +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.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()
|
l.hodlQueue.Stop()
|
||||||
|
|
||||||
close(l.quit)
|
close(l.quit)
|
||||||
|
Reference in New Issue
Block a user