diff options
author | Shelley Vohr <shelley.vohr@gmail.com> | 2019-11-22 06:44:43 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-11-22 18:01:00 +0300 |
commit | f17111280e34756c4c8a2d5e7825379baff78e78 (patch) | |
tree | c09e587aa075b26c1166c1da879ba463049d3848 /src/signal_wrap.cc | |
parent | f6de66ee711a4159355dfc05a3f5eadb3f1b8cc2 (diff) |
src: fix signal handler crash on close
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'src/signal_wrap.cc')
-rw-r--r-- | src/signal_wrap.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index cf67dc590f6..bc2d9f1e355 100644 --- a/src/signal_wrap.cc +++ b/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); } |