Skip to content
Permalink
Browse files

src: fix signal handler crash on close

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 MylesBorins committed Nov 22, 2019
1 parent cd5076e commit 8af33114e8a524982762e98302e87ebd1c3c3b11
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/signal_wrap.cc
@@ -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);
}

0 comments on commit 8af3311

Please sign in to comment.
You can’t perform that action at this time.