From 56b09db2eda5a4873989219abb7abd4271f55e1f Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Thu, 18 Aug 2011 11:18:17 -0700 Subject: [PATCH] windows: set accept socket to INVALID_SOCKET in case of accept failure --- src/win/tcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/win/tcp.c b/src/win/tcp.c index 49291072..c7a647a6 100644 --- a/src/win/tcp.c +++ b/src/win/tcp.c @@ -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); }