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 targos committed Dec 1, 2019
1 parent 4441121 commit bf43bf5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/signal_wrap.cc
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 bf43bf5

Please sign in to comment.