From 47efec2782d2c10926a348086d6e2000b0b8a6f6 Mon Sep 17 00:00:00 2001 From: ANR2ME Date: Sat, 26 Aug 2023 06:25:09 +0700 Subject: [PATCH] Treat WSAEINVAL similar to WSAEALREADY during connect for backward-compatibility to Winsock 1.1, but might confuses with an actual invalid argument error on newer Winsock. --- Core/HLE/proAdhoc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/HLE/proAdhoc.h b/Core/HLE/proAdhoc.h index c448d0189b..bb80a10a64 100644 --- a/Core/HLE/proAdhoc.h +++ b/Core/HLE/proAdhoc.h @@ -84,7 +84,7 @@ #define EALREADY WSAEALREADY #define ETIMEDOUT WSAETIMEDOUT #define EOPNOTSUPP WSAEOPNOTSUPP -inline bool connectInProgress(int errcode){ return (errcode == WSAEWOULDBLOCK || errcode == WSAEINPROGRESS || errcode == WSAEALREADY); } +inline bool connectInProgress(int errcode){ return (errcode == WSAEWOULDBLOCK || errcode == WSAEINPROGRESS || errcode == WSAEALREADY || errcode == WSAEINVAL); } // WSAEINVAL should be treated as WSAEALREADY during connect for backward-compatibility with Winsock 1.1 inline bool isDisconnected(int errcode) { return (errcode == WSAECONNRESET || errcode == WSAECONNABORTED || errcode == WSAESHUTDOWN); } #else #define INVALID_SOCKET -1