lntest: don't return from ensureConnected on non-error

This would casue the method to return before the peer list check was
performed.
This commit is contained in:
Johan T. Halseth 2019-02-25 13:03:56 -03:00
parent 1c22474ad3
commit 7f4d1cee6d
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -460,11 +460,11 @@ func (n *NetworkHarness) EnsureConnected(ctx context.Context, a, b *HarnessNode)
// can exit early.
return nil
case aErr != errConnectionRequested:
case aErr != nil && aErr != errConnectionRequested:
// Return any critical errors returned by either alice.
return aErr
case bErr != errConnectionRequested:
case bErr != nil && bErr != errConnectionRequested:
// Return any critical errors returned by either bob.
return bErr