Merge pull request #8497 from ziggie1984/shutdown-bugfix

routing: shutdown chanrouter correctly.
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2024-08-01 16:48:50 -07:00
commit 4a3c4e4ba7
14 files changed
+230 -83

No files matched your search

+9 -5
View File
@@ -572,14 +572,18 @@ func (l *channelLink) Stop() {
}
// Ensure the channel for the timer is drained.
if !l.updateFeeTimer.Stop() {
select {
case <-l.updateFeeTimer.C:
default:
if l.updateFeeTimer != nil {
if !l.updateFeeTimer.Stop() {
select {
case <-l.updateFeeTimer.C:
default:
}
}
}
l.hodlQueue.Stop()
if l.hodlQueue != nil {
l.hodlQueue.Stop()
}
close(l.quit)
l.wg.Wait()