htlcswitch/test_utils: add missing return
This commit corrects a bug in the testing harness that could cause more than one error to be returned on the error channel.
This commit is contained in:
1 file changed
+1
@@ -1365,6 +1365,7 @@ func (n *twoHopNetwork) makeHoldPayment(sendingPeer, receivingPeer lnpeer.Peer,
|
|||||||
result, ok := <-resultChan
|
result, ok := <-resultChan
|
||||||
if !ok {
|
if !ok {
|
||||||
paymentErr <- fmt.Errorf("shutting down")
|
paymentErr <- fmt.Errorf("shutting down")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if result.Error != nil {
|
if result.Error != nil {
|
||||||
|
|||||||
Reference in new issue
Block a user