diff options
author | Brad King <brad.king@kitware.com> | 2018-05-08 12:34:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-05-08 12:34:51 (GMT) |
commit | 65431c727b53ff092ad6f2f8c081982bdde52385 (patch) | |
tree | c2d84c39997e27f28b54d6722ea52721895a8352 /Utilities/cmlibuv/src/win/tcp.c | |
parent | d165fd1727c1fdf540f1759583b84110bdc4a2a3 (diff) | |
parent | 0d389d175a1c40ac0ae822e1cc638cf15f05a0ce (diff) | |
download | CMake-65431c727b53ff092ad6f2f8c081982bdde52385.zip CMake-65431c727b53ff092ad6f2f8c081982bdde52385.tar.gz CMake-65431c727b53ff092ad6f2f8c081982bdde52385.tar.bz2 |
Merge topic 'update-libuv'
0d389d175a libuv: Revert local linux/sparc64 fix now that we have upstream fix
42fbb28516 Merge branch 'upstream-libuv' into update-libuv
c8b67ea119 libuv 2018-05-06 (bf605bd7)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2049
Diffstat (limited to 'Utilities/cmlibuv/src/win/tcp.c')
-rw-r--r-- | Utilities/cmlibuv/src/win/tcp.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Utilities/cmlibuv/src/win/tcp.c b/Utilities/cmlibuv/src/win/tcp.c index fd6efba..39c1ff0 100644 --- a/Utilities/cmlibuv/src/win/tcp.c +++ b/Utilities/cmlibuv/src/win/tcp.c @@ -459,8 +459,6 @@ static void uv_tcp_queue_accept(uv_tcp_t* handle, uv_tcp_accept_t* req) { INFINITE, WT_EXECUTEINWAITTHREAD)) { SET_REQ_ERROR(req, GetLastError()); uv_insert_pending_req(loop, (uv_req_t*)req); - handle->reqs_pending++; - return; } } else { /* Make this req pending reporting an error. */ @@ -1173,11 +1171,14 @@ void uv_process_tcp_connect_req(uv_loop_t* loop, uv_tcp_t* handle, err = 0; if (REQ_SUCCESS(req)) { - if (setsockopt(handle->socket, - SOL_SOCKET, - SO_UPDATE_CONNECT_CONTEXT, - NULL, - 0) == 0) { + if (handle->flags & UV__HANDLE_CLOSING) { + /* use UV_ECANCELED for consistency with Unix */ + err = ERROR_OPERATION_ABORTED; + } else if (setsockopt(handle->socket, + SOL_SOCKET, + SO_UPDATE_CONNECT_CONTEXT, + NULL, + 0) == 0) { uv_connection_init((uv_stream_t*)handle); handle->flags |= UV_HANDLE_READABLE | UV_HANDLE_WRITABLE; loop->active_tcp_streams++; |