Merge pull request #6174 from ipfs/fix/steb-is-jetlagged

fix error check in swarm connect
This commit is contained in:
Steven Allen 2019-04-04 03:22:45 +01:00 committed by GitHub
commit c8279e95b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}