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 {