chainntnfs: ensure ntfn cancellation loop will exit

This commit fixes a slight bug introduced. We now ensure that the
cancel loop always exists if the ChainNotifier has been signaled for a
quit.
This commit is contained in:
Olaoluwa Osuntokun
2017-08-01 17:14:01 -07:00
parent b6057abe93
commit 399d9c974f
2 changed files with 4 additions and 0 deletions

View File

@@ -722,6 +722,7 @@ func (n *NeutrinoNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
return
}
case <-n.quit:
return
}
}
case <-n.quit:
@@ -891,6 +892,7 @@ func (n *NeutrinoNotifier) RegisterBlockEpochNtfn() (*chainntnfs.BlockEpochEvent
return
}
case <-n.quit:
return
}
}
case <-n.quit: