forked from TrueCloudLab/rclone
Fix retry of Windows wsaend errors #442
Make the test for wsaend error less specific
This commit is contained in:
parent
9ec06df79f
commit
f17cb1bf50
1 changed files with 2 additions and 2 deletions
|
@ -13,8 +13,8 @@ import (
|
||||||
//
|
//
|
||||||
// Code adapted from net/http
|
// Code adapted from net/http
|
||||||
func isClosedConnErrorPlatform(err error) bool {
|
func isClosedConnErrorPlatform(err error) bool {
|
||||||
if oe, ok := err.(*net.OpError); ok && oe.Op == "read" {
|
if oe, ok := err.(*net.OpError); ok {
|
||||||
if se, ok := oe.Err.(*os.SyscallError); ok && se.Syscall == "wsarecv" {
|
if se, ok := oe.Err.(*os.SyscallError); ok {
|
||||||
if errno, ok := se.Err.(syscall.Errno); ok {
|
if errno, ok := se.Err.(syscall.Errno); ok {
|
||||||
const WSAECONNABORTED syscall.Errno = 10053
|
const WSAECONNABORTED syscall.Errno = 10053
|
||||||
if errno == syscall.WSAECONNRESET || errno == WSAECONNABORTED {
|
if errno == syscall.WSAECONNRESET || errno == WSAECONNABORTED {
|
||||||
|
|
Loading…
Add table
Reference in a new issue