Commit f3e02c2f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Properly check for ioctlsocket failure in NETCON_is_alive.

parent c815baf8
......@@ -1047,13 +1047,13 @@ BOOL NETCON_is_alive(netconn_t *netconn)
char b;
mode = 1;
if(!ioctlsocket(netconn->socket, FIONBIO, &mode))
if(ioctlsocket(netconn->socket, FIONBIO, &mode))
return FALSE;
len = sock_recv(netconn->socket, &b, 1, MSG_PEEK);
mode = 0;
if(!ioctlsocket(netconn->socket, FIONBIO, &mode))
if(ioctlsocket(netconn->socket, FIONBIO, &mode))
return FALSE;
return len == 1 || (len == -1 && sock_get_error() == WSAEWOULDBLOCK);
......
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