2021-09-09 14:25:25 +02:00
|
|
|
//go:build windows
|
2016-04-29 17:42:08 +02:00
|
|
|
// +build windows
|
|
|
|
|
2018-01-12 17:30:54 +01:00
|
|
|
package fserrors
|
2016-04-29 17:42:08 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
2020-06-11 21:08:25 +02:00
|
|
|
// Windows error code list
|
|
|
|
// https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2
|
2017-09-14 17:09:48 +02:00
|
|
|
const (
|
2020-06-11 21:08:25 +02:00
|
|
|
WSAENETDOWN syscall.Errno = 10050
|
|
|
|
WSAENETUNREACH syscall.Errno = 10051
|
|
|
|
WSAENETRESET syscall.Errno = 10052
|
2017-09-14 17:09:48 +02:00
|
|
|
WSAECONNABORTED syscall.Errno = 10053
|
2020-06-11 21:08:25 +02:00
|
|
|
WSAECONNRESET syscall.Errno = 10054
|
|
|
|
WSAENOBUFS syscall.Errno = 10055
|
|
|
|
WSAENOTCONN syscall.Errno = 10057
|
|
|
|
WSAESHUTDOWN syscall.Errno = 10058
|
|
|
|
WSAETIMEDOUT syscall.Errno = 10060
|
|
|
|
WSAECONNREFUSED syscall.Errno = 10061
|
|
|
|
WSAEHOSTDOWN syscall.Errno = 10064
|
|
|
|
WSAEHOSTUNREACH syscall.Errno = 10065
|
|
|
|
WSAEDISCON syscall.Errno = 10101
|
|
|
|
WSAEREFUSED syscall.Errno = 10112
|
2017-09-14 17:09:48 +02:00
|
|
|
WSAHOST_NOT_FOUND syscall.Errno = 11001
|
|
|
|
WSATRY_AGAIN syscall.Errno = 11002
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
// append some lower level errors since the standardized ones
|
|
|
|
// don't seem to happen
|
2017-09-15 18:09:20 +02:00
|
|
|
retriableErrors = append(retriableErrors,
|
2017-09-14 17:09:48 +02:00
|
|
|
syscall.WSAECONNRESET,
|
2020-06-11 21:08:25 +02:00
|
|
|
WSAENETDOWN,
|
|
|
|
WSAENETUNREACH,
|
|
|
|
WSAENETRESET,
|
2017-09-14 17:09:48 +02:00
|
|
|
WSAECONNABORTED,
|
2020-06-11 21:08:25 +02:00
|
|
|
WSAECONNRESET,
|
|
|
|
WSAENOBUFS,
|
|
|
|
WSAENOTCONN,
|
|
|
|
WSAESHUTDOWN,
|
|
|
|
WSAETIMEDOUT,
|
|
|
|
WSAECONNREFUSED,
|
|
|
|
WSAEHOSTDOWN,
|
|
|
|
WSAEHOSTUNREACH,
|
|
|
|
WSAEDISCON,
|
|
|
|
WSAEREFUSED,
|
2017-09-14 17:09:48 +02:00
|
|
|
WSAHOST_NOT_FOUND,
|
|
|
|
WSATRY_AGAIN,
|
|
|
|
syscall.ERROR_HANDLE_EOF,
|
|
|
|
syscall.ERROR_NETNAME_DELETED,
|
|
|
|
syscall.ERROR_BROKEN_PIPE,
|
|
|
|
)
|
2016-04-29 17:42:08 +02:00
|
|
|
}
|