mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2026-01-20 14:54:22 +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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user