From 1568ec79534609b2981fa2e1c58f778b4f08a47b Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 21 Nov 2019 19:44:43 -0800 Subject: [PATCH] src: fix signal handler crash on close --- src/signal_wrap.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index cf67dc590f6d51..bc2d9f1e355efd 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -91,7 +91,10 @@ class SignalWrap : public HandleWrap { } void Close(v8::Local close_callback) override { - if (active_) DecreaseSignalHandlerCount(handle_.signum); + if (active_) { + DecreaseSignalHandlerCount(handle_.signum); + active_ = false; + } HandleWrap::Close(close_callback); }