diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 4044bbf907b..8c3a1f1f3c2 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -68,6 +68,7 @@ typedef struct { int socket; BOOL secure; + BOOL is_blocking; CtxtHandle ssl_ctx; SecPkgContext_StreamSizes ssl_sizes; server_t *server; diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 983782ddd65..73058602f6a 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -282,8 +282,11 @@ void init_winsock(void) static void set_socket_blocking(netconn_t *conn, BOOL is_blocking) { - ULONG arg = !is_blocking; - ioctlsocket(conn->socket, FIONBIO, &arg); + if(conn->is_blocking != is_blocking) { + ULONG arg = !is_blocking; + ioctlsocket(conn->socket, FIONBIO, &arg); + } + conn->is_blocking = is_blocking; } static DWORD create_netconn_socket(server_t *server, netconn_t *netconn, DWORD timeout)