mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 06:21:40 +01:00
sweep: fix handlePendingSweepsReq
linter issue
Turns out the param was never used, we now fix it by sending the response in the method and also catch the quit channel.
This commit is contained in:
parent
28df2d7327
commit
1fa8ca72ee
1 changed files with 8 additions and 1 deletions
|
@ -672,7 +672,7 @@ func (s *UtxoSweeper) collector(blockEpochs <-chan *chainntnfs.BlockEpoch) {
|
|||
// A new external request has been received to retrieve all of
|
||||
// the inputs we're currently attempting to sweep.
|
||||
case req := <-s.pendingSweepsReqs:
|
||||
req.respChan <- s.handlePendingSweepsReq(req)
|
||||
s.handlePendingSweepsReq(req)
|
||||
|
||||
// A new external request has been received to bump the fee rate
|
||||
// of a given input.
|
||||
|
@ -1058,6 +1058,13 @@ func (s *UtxoSweeper) handlePendingSweepsReq(
|
|||
}
|
||||
}
|
||||
|
||||
select {
|
||||
case req.respChan <- resps:
|
||||
case <-s.quit:
|
||||
log.Debug("Skipped sending pending sweep response due to " +
|
||||
"UtxoSweeper shutting down")
|
||||
}
|
||||
|
||||
return resps
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue