mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 22:50:58 +02:00
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:
@@ -125,6 +125,9 @@ func (b *BitcoindFilteredChainView) Start() error {
|
||||
//
|
||||
// NOTE: This is part of the FilteredChainView interface.
|
||||
func (b *BitcoindFilteredChainView) Stop() error {
|
||||
log.Debug("BitcoindFilteredChainView stopping")
|
||||
defer log.Debug("BitcoindFilteredChainView stopped")
|
||||
|
||||
// Already shutting down?
|
||||
if atomic.AddInt32(&b.stopped, 1) != 1 {
|
||||
return nil
|
||||
@@ -136,8 +139,6 @@ func (b *BitcoindFilteredChainView) Stop() error {
|
||||
|
||||
b.blockQueue.Stop()
|
||||
|
||||
log.Infof("FilteredChainView stopping")
|
||||
|
||||
close(b.quit)
|
||||
b.wg.Wait()
|
||||
|
||||
|
@@ -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()
|
||||
|
||||
|
@@ -135,13 +135,14 @@ func (c *CfFilteredChainView) Start() error {
|
||||
//
|
||||
// NOTE: This is part of the FilteredChainView interface.
|
||||
func (c *CfFilteredChainView) Stop() error {
|
||||
log.Debug("CfFilteredChainView stopping")
|
||||
defer log.Debug("CfFilteredChainView stopped")
|
||||
|
||||
// Already shutting down?
|
||||
if atomic.AddInt32(&c.stopped, 1) != 1 {
|
||||
return nil
|
||||
}
|
||||
|
||||
log.Infof("FilteredChainView stopping")
|
||||
|
||||
close(c.quit)
|
||||
c.blockQueue.Stop()
|
||||
c.wg.Wait()
|
||||
|
Reference in New Issue
Block a user