windows: set accept socket to INVALID_SOCKET in case of accept failure

This commit is contained in:
Igor Zinkovsky 2011-08-18 11:18:17 -07:00
parent d77e9795d3
commit 56b09db2ed

View File

@ -935,6 +935,7 @@ void uv_process_tcp_accept_req(uv_tcp_t* handle, uv_req_t* req) {
/* socket may still be healthy. If the server socket is broken
/* uv_queue_accept will detect it. */
closesocket(handle->accept_socket);
handle->accept_socket = INVALID_SOCKET;
if (handle->flags & UV_HANDLE_LISTENING) {
uv_tcp_queue_accept(handle);
}