p2p/net/conn: timeouts are real failures.
This commit is contained in:
parent
bdda7ff6b6
commit
b20f767eb4
|
@ -147,6 +147,11 @@ func reuseErrShouldRetry(err error) bool {
|
|||
return false // hey, it worked! no need to retry.
|
||||
}
|
||||
|
||||
// if it's a network timeout error, it's a legitimate failure.
|
||||
if nerr, ok := err.(net.Error); ok && nerr.Timeout() {
|
||||
return true
|
||||
}
|
||||
|
||||
errno, ok := err.(syscall.Errno)
|
||||
if !ok { // not an errno? who knows what this is. retry.
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue