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:
Conner Fromknecht 2020-04-07 11:54:56 -07:00
parent 310e20f8b7
commit 759d7a122f
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

View File

@ -1365,6 +1365,7 @@ func (n *twoHopNetwork) makeHoldPayment(sendingPeer, receivingPeer lnpeer.Peer,
result, ok := <-resultChan
if !ok {
paymentErr <- fmt.Errorf("shutting down")
return
}
if result.Error != nil {