From 759d7a122f80818c585f09cb3aeeceba71b7e93e Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 7 Apr 2020 11:54:56 -0700 Subject: [PATCH] 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. --- htlcswitch/test_utils.go | 1 + 1 file changed, 1 insertion(+) diff --git a/htlcswitch/test_utils.go b/htlcswitch/test_utils.go index f302ff01..0d6f3b4d 100644 --- a/htlcswitch/test_utils.go +++ b/htlcswitch/test_utils.go @@ -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 {