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 committed 2019-04-24 09:44:15 +02:00
1 parent 1c22474ad3
commit 7f4d1cee6d
1 file changed
+2 -2
+2 -2
View File
@@ -460,11 +460,11 @@ func (n *NetworkHarness) EnsureConnected(ctx context.Context, a, b *HarnessNode)
// can exit early. // can exit early.
return nil return nil
case aErr != errConnectionRequested: case aErr != nil && aErr != errConnectionRequested:
// Return any critical errors returned by either alice. // Return any critical errors returned by either alice.
return aErr return aErr
case bErr != errConnectionRequested: case bErr != nil && bErr != errConnectionRequested:
// Return any critical errors returned by either bob. // Return any critical errors returned by either bob.
return bErr return bErr