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
@ -775,13 +775,7 @@ func (f *fundingManager) CancelPeerReservations(nodePub [33]byte) {
|
|||||||
"node=%x: %v", nodePub[:], err)
|
"node=%x: %v", nodePub[:], err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if resCtx.err != nil {
|
resCtx.err <- fmt.Errorf("peer disconnected")
|
||||||
select {
|
|
||||||
case resCtx.err <- fmt.Errorf("peer disconnected"):
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
delete(nodeReservations, pendingID)
|
delete(nodeReservations, pendingID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user