multi: make sure missionControlStore catches done signal

This commit makes sure `missionControlStore` catches the shutdown signal
when draining the ticker. A few debug logs are added to aid the process.
This commit is contained in:
yyforyongyu committed 2024-07-23 21:30:08 +08:00
1 parent 50279464ad
commit 2608c0893e
6 files changed
+25 -10

No files matched your search

+3 -2
View File
@@ -135,6 +135,9 @@ func (b *BtcdFilteredChainView) Start() error {
//
// NOTE: This is part of the FilteredChainView interface.
func (b *BtcdFilteredChainView) Stop() error {
log.Debug("BtcdFilteredChainView stopping")
defer log.Debug("BtcdFilteredChainView stopped")
// Already shutting down?
if atomic.AddInt32(&b.stopped, 1) != 1 {
return nil
@@ -146,8 +149,6 @@ func (b *BtcdFilteredChainView) Stop() error {
b.blockQueue.Stop()
log.Infof("FilteredChainView stopping")
close(b.quit)
b.wg.Wait()