fix error check in swarm connect
🤦♂️ fixes https://github.com/ipfs/go-ipfs/pull/6171/files/d21bb1eed85401412ad0e8749f60de75ee27051a#discussion_r271949856 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Steven Allen committed
Apr 3, 2019 at 15:00 UTC
b6098bac7a031905b4063f3f5abad9cabf493685
1 file changed
+1
-1
core/coreapi/swarm.go
+1
-1
@@ -40,7 +40,7 @@ func (api *SwarmAPI) Connect(ctx context.Context, pi pstore.PeerInfo) error {
40
swrm.Backoff().Clear(pi.ID)
41
}
42
43
- if err := api.peerHost.Connect(ctx, pi); err == nil {
43
+ if err := api.peerHost.Connect(ctx, pi); err != nil {
44
return err
45
}
46