Skip to content

Commit

Permalink
fix flaky test with debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
dygabo committed May 7, 2024
1 parent e8708bd commit a25aab1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handle_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ void HandleWrap::OnClose(uv_handle_t* handle) {
wrap->OnClose();
wrap->handle_wrap_queue_.Remove();

if (!wrap->persistent().IsEmpty() &&
if (!env->isolate()->IsExecutionTerminating() &&
!wrap->persistent().IsEmpty() &&
wrap->object()->Has(env->context(), env->handle_onclose_symbol())
.FromMaybe(false)) {
wrap->MakeCallback(env->handle_onclose_symbol(), 0, nullptr);
Expand Down

0 comments on commit a25aab1

Please sign in to comment.