node-graceful
Advanced tools
Comparing version 1.0.1 to 2.0.0
// +----------------------------------------------------------------------+ | ||
// | node-graceful v0.3.1 (https://github.com/mrbar42/node-graceful) | | ||
// | node-graceful v2.0.0 (https://github.com/mrbar42/node-graceful) | | ||
// | Graceful process exit manager. | | ||
@@ -88,3 +88,3 @@ // |----------------------------------------------------------------------| | ||
var _this = this; | ||
var deadly = this.DEADLY_SIGNALS.indexOf(signal) !== -1; | ||
var deadly = signal === 'exit' || this.DEADLY_SIGNALS.indexOf(signal) !== -1; | ||
var listeners = this._listeners[signal] && this._listeners[signal].slice(); | ||
@@ -94,3 +94,3 @@ var exitListeners = this._listeners['exit'] && this._listeners['exit'].slice(); | ||
// also include exit listeners if deadly | ||
if (deadly && exitListeners) { | ||
if (deadly && exitListeners && signal !== 'exit') { | ||
targetCount += exitListeners.length; | ||
@@ -113,3 +113,3 @@ } | ||
// exec signal specific listeners | ||
if (listeners) { | ||
if (listeners && signal !== 'exit') { | ||
listeners.forEach(function (listener) { return _this._invokeListener(listener, quit, event, signal); }); | ||
@@ -116,0 +116,0 @@ } |
// +----------------------------------------------------------------------+ | ||
// | node-graceful v0.3.1 (https://github.com/mrbar42/node-graceful) | | ||
// | node-graceful v2.0.0 (https://github.com/mrbar42/node-graceful) | | ||
// | Graceful process exit manager. | | ||
@@ -104,3 +104,3 @@ // |----------------------------------------------------------------------| | ||
Graceful.prototype._processSignal = function _processSignal(signal, event) { | ||
let deadly = this.DEADLY_SIGNALS.indexOf(signal) !== -1; | ||
let deadly = signal === 'exit' || this.DEADLY_SIGNALS.indexOf(signal) !== -1; | ||
let listeners = this._listeners[signal] && this._listeners[signal].slice(); | ||
@@ -111,3 +111,3 @@ let exitListeners = this._listeners['exit'] && this._listeners['exit'].slice(); | ||
// also include exit listeners if deadly | ||
if (deadly && exitListeners) { | ||
if (deadly && exitListeners && signal !== 'exit') { | ||
targetCount += exitListeners.length; | ||
@@ -132,3 +132,3 @@ } | ||
// exec signal specific listeners | ||
if (listeners) { | ||
if (listeners && signal !== 'exit') { | ||
listeners.forEach(listener => this._invokeListener(listener, quit, event, signal)); | ||
@@ -135,0 +135,0 @@ } |
{ | ||
"name": "node-graceful", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Graceful process exit manager. allows waiting on multiple async services.", | ||
@@ -30,3 +30,3 @@ "main": "index", | ||
"devDependencies": { | ||
"@types/node": "9.6.0", | ||
"@types/node": "8.10.48", | ||
"ts-node": "5.0.1", | ||
@@ -33,0 +33,0 @@ "tslint": "5.9.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87888
23