multi: move several wait group done calls to defer statements
This commit is contained in:
1 parent
27849d3020
commit
10d94f99c0
5 files changed
+10
-6
No files matched your search
@@ -288,6 +288,8 @@ func (b *BtcdNotifier) onRedeemingTx(tx *btcutil.Tx, details *btcjson.BlockDetai
|
||||
// notificationDispatcher is the primary goroutine which handles client
|
||||
// notification registrations, as well as notification dispatches.
|
||||
func (b *BtcdNotifier) notificationDispatcher() {
|
||||
defer b.wg.Done()
|
||||
|
||||
out:
|
||||
for {
|
||||
select {
|
||||
@@ -487,7 +489,6 @@ out:
|
||||
break out
|
||||
}
|
||||
}
|
||||
b.wg.Done()
|
||||
}
|
||||
|
||||
// historicalConfDetails looks up whether a confirmation request (txid/output
|
||||
|
||||
Reference in new issue
Block a user