[PATCH v2 2/3] winhttp: Return an winhttp error from netconn_create() on connection failure.

Paul Gofman pgofman at codeweavers.com
Mon Mar 14 05:31:27 CDT 2022


Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
   v2: no changes.

 dlls/winhttp/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 09ed5e222d1..5e4c55fad6a 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -246,7 +246,7 @@ DWORD netconn_create( struct hostdata *host, const struct sockaddr_storage *sock
         WARN( "unable to connect to host (%lu)\n", ret );
         closesocket( conn->socket );
         free( conn );
-        return ret;
+        return ret == ERROR_WINHTTP_TIMEOUT ? ERROR_WINHTTP_TIMEOUT : ERROR_WINHTTP_CANNOT_CONNECT;
     }
 
     *ret_conn = conn;
-- 
2.35.1




More information about the wine-devel mailing list