chainntfns/btcdnotify: close channels for all epoch clients on shutdown
This commit modifies the Stop method of the default ChainNotifier client, the BtcdNotifier. We now close the notificaiton channel for all the currently active block epoch clients in order to give clients a signal that the entire daemon and possibly the ChainNotifier is shutting down. This gives clients an extra signal to more thoroughly implement a graceful shutdown across the daemon.
This commit is contained in:
parent
a88b093843
commit
f29b496b76
@ -159,6 +159,9 @@ func (b *BtcdNotifier) Stop() error {
|
||||
close(confClient.negativeConf)
|
||||
}
|
||||
}
|
||||
for _, epochClient := range b.blockEpochClients {
|
||||
close(epochClient)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user