mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 06:35:07 +01:00
chainntfns: close all pending client channels on shutdown for BtcdNotifier
This commit is contained in:
parent
3186b3038c
commit
77d37298f4
1 changed files with 10 additions and 0 deletions
|
@ -110,6 +110,16 @@ func (b *BtcdNotifier) Stop() error {
|
|||
close(b.quit)
|
||||
b.wg.Wait()
|
||||
|
||||
// Notify all pending clients of our shutdown by closing the related
|
||||
// notification channels.
|
||||
for _, spendClient := range b.spendNotifications {
|
||||
close(spendClient.spendChan)
|
||||
}
|
||||
for _, confClient := range b.confNotifications {
|
||||
close(confClient.finConf)
|
||||
close(confClient.negativeConf)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue