mirror of
https://github.com/rclone/rclone.git
synced 2026-10-10 06:55:45 -04:00
ENETUNREACH and ENETDOWN were not in the list of retriable errors on non-Windows platforms, so a single failed connection aborted the transfer instead of being retried as a low level retry. The Windows list already includes the equivalent WSAENETUNREACH and WSAENETDOWN. This is easy to hit on a host with IPv6 enabled but no IPv6 route: if the A lookup fails transiently while the AAAA lookup succeeds, the only address to dial is IPv6 and the connect fails with ENETUNREACH. A retry resolves again and normally succeeds.
24 lines
359 B
Go
24 lines
359 B
Go
//go:build !plan9
|
|
|
|
package fserrors
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
func init() {
|
|
retriableErrors = append(retriableErrors,
|
|
syscall.EPIPE,
|
|
syscall.ETIMEDOUT,
|
|
syscall.ECONNREFUSED,
|
|
syscall.EHOSTDOWN,
|
|
syscall.EHOSTUNREACH,
|
|
syscall.ENETDOWN,
|
|
syscall.ENETUNREACH,
|
|
syscall.ECONNABORTED,
|
|
syscall.EAGAIN,
|
|
syscall.EWOULDBLOCK,
|
|
syscall.ECONNRESET,
|
|
)
|
|
}
|