@@ -13,23 +13,27 @@ import (
1313var KnownErrors = map [string ]string {
1414 "i/o timeout" : models .NetErrorIoTimeout ,
1515 "RPC timeout" : models .NetErrorIoTimeout ,
16- "no recent network activity" : models .NetErrorNoRecentNetworkActivity ,
16+ "no recent network activity" : models .NetErrorIoTimeout , // formerly NetErrorNoRecentNetworkActivity (equivalent to a timeout)
1717 "connection refused" : models .NetErrorConnectionRefused ,
1818 "connection reset by peer" : models .NetErrorConnectionResetByPeer ,
1919 "protocol not supported" : models .NetErrorProtocolNotSupported ,
20+ "protocols not supported" : models .NetErrorProtocolNotSupported ,
2021 "peer id mismatch" : models .NetErrorPeerIDMismatch ,
22+ "peer IDs don't match" : models .NetErrorPeerIDMismatch ,
2123 "no route to host" : models .NetErrorNoRouteToHost ,
2224 "network is unreachable" : models .NetErrorNetworkUnreachable ,
2325 "no good addresses" : models .NetErrorNoGoodAddresses ,
2426 "context deadline exceeded" : models .NetErrorIoTimeout , // formerly NetErrorContextDeadlineExceeded
25- "no public IP address" : models .NetErrorNoPublicIP ,
27+ "no public IP address" : models .NetErrorNoIPAddress ,
2628 "max dial attempts exceeded" : models .NetErrorMaxDialAttemptsExceeded ,
2729 "host is down" : models .NetErrorHostIsDown ,
2830 "stream reset" : models .NetErrorStreamReset ,
2931 "failed to negotiate security protocol: EOF" : models .NetErrorNegotiateSecurityProtocol , // connect retry logic in discv5 relies on the ": EOF" suffix.
3032 "failed to negotiate stream multiplexer" : models .NetErrorNegotiateStreamMultiplexer ,
3133 "resource limit exceeded" : models .NetErrorResourceLimitExceeded ,
3234 "Write on stream" : models .NetErrorWriteOnStream ,
35+ "can't assign requested address" : models .NetErrorCantAssignRequestedAddress , // transient error
36+ "connection gated" : models .NetErrorConnectionGated , // transient error
3337}
3438
3539var ErrorStr = map [string ]string {}
@@ -48,10 +52,14 @@ var knownErrorsPrecedence = []string{
4852 "i/o timeout" ,
4953 "RPC timeout" ,
5054 "no recent network activity" ,
55+ "can't assign requested address" ,
56+ "connection gated" ,
5157 "connection refused" ,
5258 "connection reset by peer" ,
5359 "protocol not supported" ,
60+ "protocols not supported" ,
5461 "peer id mismatch" ,
62+ "peer IDs don't match" ,
5563 "no route to host" ,
5664 "network is unreachable" ,
5765 "no good addresses" ,
0 commit comments