Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-10-12 02:11:11 +0300
committerMyles Borins <mylesborins@google.com>2019-11-21 08:29:27 +0300
commit564c18e2140acd32f1c9d6ae4630d69706fa0528 (patch)
treee61c197cab069c90eaeeec247a7325019af13b80 /src
parent4222f2400ae68853c22b73dc51a6ec991808f1f4 (diff)
src: remove HandleWrap instances from list once closed
This allows keeping `BaseObjectPtr`s to `HandleWrap` instances. Previously, the pointer kept the `HandleWrap` object alive, leaving the Environment cleanup code that waits for the handle list to drain in a busy loop, because only the `HandleWrap` destructor removed the item from the list. Refs: https://github.com/nodejs/quic/pull/165 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> PR-URL: https://github.com/nodejs/node/pull/30374 Refs: https://github.com/nodejs/quic/pull/141 Refs: https://github.com/nodejs/quic/pull/149 Refs: https://github.com/nodejs/quic/pull/141 Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/handle_wrap.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc
index f3a35557541..198b0456e75 100644
--- a/src/handle_wrap.cc
+++ b/src/handle_wrap.cc
@@ -128,6 +128,7 @@ void HandleWrap::OnClose(uv_handle_t* handle) {
wrap->state_ = kClosed;
wrap->OnClose();
+ wrap->handle_wrap_queue_.Remove();
if (!wrap->persistent().IsEmpty() &&
wrap->object()->Has(env->context(), env->handle_onclose_symbol())