mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
utxonursery: check for quit channel
This commit is contained in:
parent
8b515f83b3
commit
77d6a6697d
@ -359,6 +359,14 @@ func (u *utxoNursery) IncubateOutputs(chanPoint wire.OutPoint,
|
||||
u.wg.Add(1)
|
||||
defer u.wg.Done()
|
||||
|
||||
// Check quit channel for the case where the waitgroup wait was finished
|
||||
// right before this function's add call was made.
|
||||
select {
|
||||
case <-u.quit:
|
||||
return fmt.Errorf("nursery shutting down")
|
||||
default:
|
||||
}
|
||||
|
||||
numHtlcs := len(incomingHtlcs) + len(outgoingHtlcs)
|
||||
var (
|
||||
hasCommit bool
|
||||
|
Loading…
Reference in New Issue
Block a user