fix: if ErrTransportNotSupported, then just log and return the error, don't bother blocking

This commit is contained in:
Derrick Hammer 2024-03-05 15:01:59 -05:00
parent 397ed0d6ec
commit cca7d881de
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 0 deletions

View File

@ -302,6 +302,11 @@ 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)
} }