htlcswitch: close the updateFeeTimer properly

This commit is contained in:
yyforyongyu committed 2020-12-04 23:08:50 +08:00
1 parent be626df689
commit bf036f2665
1 file changed
+8 -1
+8 -1
View File
@@ -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)