fixup! win: track each write_req in a queue instead of just a count
This commit is contained in:
parent
695043fa18
commit
85fcb68422
@ -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);
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user