fix: ErrTransportNotSupported check in wrong location
This commit is contained in:
parent
cca7d881de
commit
a87bfe7ba6
|
@ -285,6 +285,12 @@ func (p *P2PServiceDefault) ConnectToNode(connectionUris []*url.URL, retried boo
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if errors.Is(err, net.ErrTransportNotSupported) {
|
||||||
|
p.Logger().Debug("failed to connect, unsupported transport", zap.String("node", connectionUri.String()), zap.Error(err))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
retried = true
|
retried = true
|
||||||
|
|
||||||
p.Logger().Error("failed to connect", zap.String("node", connectionUri.String()), zap.Error(err))
|
p.Logger().Error("failed to connect", zap.String("node", connectionUri.String()), zap.Error(err))
|
||||||
|
@ -302,11 +308,6 @@ func (p *P2PServiceDefault) ConnectToNode(connectionUris []*url.URL, retried boo
|
||||||
return p.ConnectToNode(connectionUris, retried, fromPeer)
|
return p.ConnectToNode(connectionUris, retried, fromPeer)
|
||||||
}
|
}
|
||||||
|
|
||||||
if errors.Is(err, net.ErrTransportNotSupported) {
|
|
||||||
p.Logger().Debug("failed to connect, unsupported transport", zap.String("node", connectionUri.String()), zap.Error(err))
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if p.outgoingPeerFailures.Contains(idString) {
|
if p.outgoingPeerFailures.Contains(idString) {
|
||||||
p.outgoingPeerFailures.Remove(idString)
|
p.outgoingPeerFailures.Remove(idString)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue