Merge pull request #8497 from ziggie1984/shutdown-bugfix
routing: shutdown chanrouter correctly.
This commit is contained in:
14 files changed
+230
-83
No files matched your search
+9
-5
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user