mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 20:07:12 +08:00
Fix retry of Windows wsaend errors #442
Make the test for wsaend error less specific
This commit is contained in:
parent
9ec06df79f
commit
f17cb1bf50
|
@ -13,8 +13,8 @@ import (
|
|||
//
|
||||
// Code adapted from net/http
|
||||
func isClosedConnErrorPlatform(err error) bool {
|
||||
if oe, ok := err.(*net.OpError); ok && oe.Op == "read" {
|
||||
if se, ok := oe.Err.(*os.SyscallError); ok && se.Syscall == "wsarecv" {
|
||||
if oe, ok := err.(*net.OpError); ok {
|
||||
if se, ok := oe.Err.(*os.SyscallError); ok {
|
||||
if errno, ok := se.Err.(syscall.Errno); ok {
|
||||
const WSAECONNABORTED syscall.Errno = 10053
|
||||
if errno == syscall.WSAECONNRESET || errno == WSAECONNABORTED {
|
||||
|
|
Loading…
Reference in New Issue
Block a user