diff --git a/htlcswitch/link.go b/htlcswitch/link.go index 6a7c3128..df6bafc9 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -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)