multi: move several wait group done calls to defer statements

This commit is contained in:
Federico Bond
2019-07-09 12:26:27 -03:00
committed by Oliver Gugger
parent 27849d3020
commit 10d94f99c0
5 changed files with 10 additions and 6 deletions

View File

@@ -174,6 +174,8 @@ func (b *BitcoindNotifier) startNotifier() error {
// notificationDispatcher is the primary goroutine which handles client
// notification registrations, as well as notification dispatches.
func (b *BitcoindNotifier) notificationDispatcher() {
defer b.wg.Done()
out:
for {
select {
@@ -436,7 +438,6 @@ out:
break out
}
}
b.wg.Done()
}
// historicalConfDetails looks up whether a confirmation request (txid/output