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:
6 files changed
+25
-10
No files matched your search
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user