Skip to content

Commit

Permalink
src: fix signal handler crash on close
Browse files Browse the repository at this point in the history
PR-URL: #30582
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
  • Loading branch information
codebytere authored and addaleax committed Nov 22, 2019
1 parent f6de66e commit f171112
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/signal_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ class SignalWrap : public HandleWrap {
}

void Close(v8::Local<v8::Value> close_callback) override {
if (active_) DecreaseSignalHandlerCount(handle_.signum);
if (active_) {
DecreaseSignalHandlerCount(handle_.signum);
active_ = false;
}
HandleWrap::Close(close_callback);
}

Expand Down

0 comments on commit f171112

Please sign in to comment.