diff options
Diffstat (limited to 'deps/uv/src/win/poll.c')
-rw-r--r-- | deps/uv/src/win/poll.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/deps/uv/src/win/poll.c b/deps/uv/src/win/poll.c index 578d9fff17..4d8e1f99f6 100644 --- a/deps/uv/src/win/poll.c +++ b/deps/uv/src/win/poll.c @@ -505,6 +505,11 @@ int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle, int len; SOCKET peer_socket, base_socket; DWORD bytes; + DWORD yes = 1; + + /* Set the socket to nonblocking mode */ + if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR) + return uv_translate_sys_error(WSAGetLastError()); /* Try to obtain a base handle for the socket. This increases this chances */ /* that we find an AFD handle and are able to use the fast poll mechanism. */ |