windows: set accept socket to INVALID_SOCKET in case of accept failure
This commit is contained in:
parent
d77e9795d3
commit
56b09db2ed
@ -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
|
/* socket may still be healthy. If the server socket is broken
|
||||||
/* uv_queue_accept will detect it. */
|
/* uv_queue_accept will detect it. */
|
||||||
closesocket(handle->accept_socket);
|
closesocket(handle->accept_socket);
|
||||||
|
handle->accept_socket = INVALID_SOCKET;
|
||||||
if (handle->flags & UV_HANDLE_LISTENING) {
|
if (handle->flags & UV_HANDLE_LISTENING) {
|
||||||
uv_tcp_queue_accept(handle);
|
uv_tcp_queue_accept(handle);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user