You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
case *swarm.DialError:
errKind = "dial-error"
for _, de := range e.DialErrors {
if de.Cause.Error() == "dial backoff" {
errKind = "dial-backoff"
break
}
}
dialErr, ok := err.(*swarm.DialError)
if ok {
for _, transportErr := range dialErr.DialErrors {
if errors.Is(transportErr.Cause, network.ErrResourceLimitExceeded) {
limitErrOnce.Do(func() { logger.Errorf(rtRefreshLimitsMsg) })
}
}
}
Almost all of the users of swarm.DialError either expect swarm.DialError to wrap over errors of individual dials. To summarise this should return true
I think this is a reasonable thing to fix. Some previous discussion here: #2414 (comment)
There are a lot of usecases here:
https://github.com/search?q=swarm.DialError&type=code
A few examples:
https://github.com/ipni/cassette/blob/ca08e5af7376dc249cbb3a1173bbc6b37e38ceea/metrics.go#L301-L309
https://github.com/libp2p/go-libp2p-kad-dht/blob/ee95d1ab03c47aab03218e18d07483f51e7787e4/fullrt/dht.go#L315
https://github.com/smartcontractkit/libocr/blob/82b910bef5c1c95cc7a886091ccfc1895bde76f5/networking/ocr_endpoint_v1.go#L428
The text was updated successfully, but these errors were encountered: