Commit 9d3fda00 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Cache blocking state in netconn_t.

parent eef89b50
......@@ -68,6 +68,7 @@ typedef struct
{
int socket;
BOOL secure;
BOOL is_blocking;
CtxtHandle ssl_ctx;
SecPkgContext_StreamSizes ssl_sizes;
server_t *server;
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment