mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
lnwallet: ensure sigPool goroutines can always exit
This commit is contained in:
parent
8c181b6f4e
commit
03ba13fcf8
@ -191,6 +191,8 @@ func (s *sigPool) poolWorker() {
|
|||||||
continue
|
continue
|
||||||
case <-sigMsg.cancel:
|
case <-sigMsg.cancel:
|
||||||
continue
|
continue
|
||||||
|
case <-s.quit:
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,6 +204,8 @@ func (s *sigPool) poolWorker() {
|
|||||||
}:
|
}:
|
||||||
case <-sigMsg.cancel:
|
case <-sigMsg.cancel:
|
||||||
continue
|
continue
|
||||||
|
case <-s.quit:
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// We've just received a new verification job from the outside
|
// We've just received a new verification job from the outside
|
||||||
@ -226,11 +230,15 @@ func (s *sigPool) poolWorker() {
|
|||||||
select {
|
select {
|
||||||
case verifyMsg.errResp <- err:
|
case verifyMsg.errResp <- err:
|
||||||
case <-verifyMsg.cancel:
|
case <-verifyMsg.cancel:
|
||||||
|
case <-s.quit:
|
||||||
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
select {
|
select {
|
||||||
case verifyMsg.errResp <- nil:
|
case verifyMsg.errResp <- nil:
|
||||||
case <-verifyMsg.cancel:
|
case <-verifyMsg.cancel:
|
||||||
|
case <-s.quit:
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user