graceful-shutdown
Advanced tools
Comparing version 0.0.1 to 0.0.2
0.0.2 / 2013-12-12 | ||
================== | ||
* use once-upon 0.0.2 | ||
* use debug | ||
* tests; improve close checks | ||
0.0.1 / 2013-12-12 | ||
@@ -3,0 +10,0 @@ ================== |
'use strict'; | ||
var onceUpon = require('once-upon'); | ||
var debug = require('debug')('graceful-shutdown'); | ||
@@ -55,2 +56,3 @@ module.exports = exports = GracefulShutdown; | ||
GracefulShutdown.prototype._shutdown = function _shutdown () { | ||
debug('_shutdown'); | ||
this.server.close(); | ||
@@ -57,0 +59,0 @@ if (this.cb) this.cb(); |
{ | ||
"name": "graceful-shutdown", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Gracefully shutdown a server upon receiving the specified signal(s)", | ||
@@ -12,3 +12,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"once-upon": "0.0.1" | ||
"once-upon": "0.0.2", | ||
"debug": "0.7.4" | ||
}, | ||
@@ -15,0 +16,0 @@ "devDependencies": { |
@@ -85,2 +85,7 @@ | ||
var closed = 0; | ||
s.on('close', function() { | ||
closed++; | ||
}); | ||
process.emit('SIGCAKE'); | ||
@@ -92,6 +97,9 @@ process.emit('SIGCOOKIE'); | ||
assert.equal(1, called); | ||
done(); | ||
setTimeout(function() { | ||
assert.equal(1, called); | ||
assert.equal(1, closed); | ||
done(); | ||
}, 100); | ||
}); | ||
}); | ||
}); |
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
5855
137
2
+ Addeddebug@0.7.4
+ Addeddebug@0.7.4(transitive)
+ Addedonce-upon@0.0.2(transitive)
- Removedonce@1.3.3(transitive)
- Removedonce-upon@0.0.1(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedonce-upon@0.0.2