winhttp: Return an winhttp error from netconn_create() on connection failure.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2022-03-14 13:31:27 +03:00 committed by Alexandre Julliard
parent e87d79fc49
commit 550fdbd1de
1 changed files with 1 additions and 1 deletions

View File

@ -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;