From b3ad00653cde07a1059194a3c25755d8fb86e327 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Sat, 14 Mar 2026 12:36:27 -0400 Subject: [PATCH] fixup! fixup! win: track each write_req in a queue instead of just a count --- src/win/tcp.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/win/tcp.c b/src/win/tcp.c index 6072a213e..30129a277 100644 --- a/src/win/tcp.c +++ b/src/win/tcp.c @@ -1077,6 +1077,7 @@ void uv__process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle, void uv__process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle, uv_write_t* req) { + //uv_shutdown_t* shutdown_req; int err; assert(handle->type == UV_TCP); @@ -1111,10 +1112,23 @@ void uv__process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle, closesocket(handle->socket); handle->socket = INVALID_SOCKET; } - if (uv__is_stream_shutting(handle)) - uv__process_tcp_shutdown_req(loop, - handle, - handle->stream.conn.shutdown_req); +// if (uv__is_stream_shutting(handle)) { +// shutdown_req = handle->stream.conn.shutdown_req; +// if (shutdown_req->next_req == (uv_req_t*)shutdown_req) { +// assert(loop->pending_reqs_tail == (uv_req_t*)shutdown_req); +// loop->pending_reqs_tail = NULL; +// } else { +// uv_req_t** pending; +// pending = &loop->pending_reqs_tail; +// while ((*pending)->next_req != (uv_req_t*)shutdown_req) { +// pending = &(*pending)->next_req; +// assert(*pending != loop->pending_reqs_tail); +// } +// *pending = shutdown_req->next_req; +// } +// shutdown_req->next_req = NULL; +// uv__process_tcp_shutdown_req(loop, handle, shutdown_req); +// } } DECREASE_PENDING_REQ_COUNT(handle);