Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graceful-shutdown

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graceful-shutdown - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

7

History.md
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 @@ ==================

2

index.js
'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();

5

package.json
{
"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);
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc