From b6098bac7a031905b4063f3f5abad9cabf493685 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 3 Apr 2019 15:00:13 -0700 Subject: [PATCH] fix error check in swarm connect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤦‍♂️ fixes https://github.com/ipfs/go-ipfs/pull/6171/files/d21bb1eed85401412ad0e8749f60de75ee27051a#discussion_r271949856 License: MIT Signed-off-by: Steven Allen --- core/coreapi/swarm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/coreapi/swarm.go b/core/coreapi/swarm.go index 9f9dc55aabd..8b55e8278e3 100644 --- a/core/coreapi/swarm.go +++ b/core/coreapi/swarm.go @@ -40,7 +40,7 @@ func (api *SwarmAPI) Connect(ctx context.Context, pi pstore.PeerInfo) error { swrm.Backoff().Clear(pi.ID) } - if err := api.peerHost.Connect(ctx, pi); err == nil { + if err := api.peerHost.Connect(ctx, pi); err != nil { return err }