Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Fix retry of Windows wsaend errors #442

Nick Craig-Woodf17cb1bf50c8
diff --git a/fs/closed_conn_win.go b/fs/closed_conn_win.go
index 6c843aace..488d22f7a 100644
--- a/fs/closed_conn_win.go
+++ b/fs/closed_conn_win.go
@@ -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 {