fixup! win: track each write_req in a queue instead of just a count

This commit is contained in:
Jameson Nash 2026-03-13 15:13:44 +00:00
parent 695043fa18
commit 85fcb68422
2 changed files with 2 additions and 3 deletions

View File

@ -1083,7 +1083,7 @@ void uv__process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle,
assert(handle->write_queue_size >= req->u.io.queued_bytes); assert(handle->write_queue_size >= req->u.io.queued_bytes);
handle->write_queue_size -= req->u.io.queued_bytes; handle->write_queue_size -= req->u.io.queued_bytes;
uv__queue_remove(&req->queue);
UNREGISTER_HANDLE_REQ(loop, handle); UNREGISTER_HANDLE_REQ(loop, handle);
if (handle->flags & UV_HANDLE_EMULATE_IOCP) { if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
@ -1106,7 +1106,6 @@ void uv__process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle,
req->cb(req, err); req->cb(req, err);
} }
uv__queue_remove(&req->queue);
if (uv__queue_empty(&handle->stream.conn.write_queue)) { if (uv__queue_empty(&handle->stream.conn.write_queue)) {
if (handle->flags & UV_HANDLE_CLOSING) { if (handle->flags & UV_HANDLE_CLOSING) {
closesocket(handle->socket); closesocket(handle->socket);

View File

@ -2204,6 +2204,7 @@ void uv__process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle,
handle->write_queue_size -= req->u.io.queued_bytes; handle->write_queue_size -= req->u.io.queued_bytes;
UNREGISTER_HANDLE_REQ(loop, handle); UNREGISTER_HANDLE_REQ(loop, handle);
uv__queue_remove(&req->queue);
if (req->cb) { if (req->cb) {
err = GET_REQ_ERROR(req); err = GET_REQ_ERROR(req);
@ -2211,7 +2212,6 @@ void uv__process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle,
} }
uv__queue_remove(&req->queue);
if (uv__queue_empty(&handle->stream.conn.write_queue) && if (uv__queue_empty(&handle->stream.conn.write_queue) &&
uv__is_stream_shutting(handle)) uv__is_stream_shutting(handle))
uv__process_tty_shutdown_req(loop, uv__process_tty_shutdown_req(loop,