mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-21 22:11:41 +01:00
fundingmanager: send error directly in CancelPeerReservations
The error channel should never be nil, and it should always be buffered. Because of this we can send directly on the channel.
This commit is contained in:
parent
b63ee1a410
commit
7d38e35cdc
1 changed files with 1 additions and 7 deletions
|
@ -775,13 +775,7 @@ func (f *fundingManager) CancelPeerReservations(nodePub [33]byte) {
|
|||
"node=%x: %v", nodePub[:], err)
|
||||
}
|
||||
|
||||
if resCtx.err != nil {
|
||||
select {
|
||||
case resCtx.err <- fmt.Errorf("peer disconnected"):
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
resCtx.err <- fmt.Errorf("peer disconnected")
|
||||
delete(nodeReservations, pendingID)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue