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 <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
  • Loading branch information
codebytere authored and addaleax committed Nov 30, 2019
1 parent 19d192d commit 1916acb
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 1916acb

Please sign in to comment.