win: Fix crash when calling uv_close from shutdown callback
This commit is contained in:
parent
bdac72cc93
commit
2c0fca9a41
@ -231,6 +231,7 @@ void uv_pipe_endgame(uv_loop_t* loop, uv_pipe_t* handle) {
|
|||||||
if (result) {
|
if (result) {
|
||||||
/* Mark the handle as shut now to avoid going through this again. */
|
/* Mark the handle as shut now to avoid going through this again. */
|
||||||
handle->flags |= UV_HANDLE_SHUT;
|
handle->flags |= UV_HANDLE_SHUT;
|
||||||
|
return;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Failure. */
|
/* Failure. */
|
||||||
|
|||||||
@ -128,7 +128,9 @@ void uv_tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle) {
|
|||||||
}
|
}
|
||||||
handle->shutdown_req->cb(handle->shutdown_req, status);
|
handle->shutdown_req->cb(handle->shutdown_req, status);
|
||||||
}
|
}
|
||||||
handle->reqs_pending--;
|
|
||||||
|
DECREASE_PENDING_REQ_COUNT(handle);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handle->flags & UV_HANDLE_CLOSING &&
|
if (handle->flags & UV_HANDLE_CLOSING &&
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user