Socket
Socket
Sign inDemoInstall

express-graceful-exit

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-graceful-exit - npm Package Compare versions

Comparing version 0.5.0-rc.1 to 0.5.0-rc.2

6

CHANGELOG.md

@@ -0,1 +1,7 @@

0.5.0-rc.2 / 2019-10-18
=======================
Thank you hhunt for additional testing and the fix PR
* Fix errors in new option to handle a last request, including a crasher
0.5.0-rc.1 / 2019-10-15

@@ -2,0 +8,0 @@ =======================

10

lib/graceful-exit.js

@@ -149,2 +149,3 @@

var headers = inspect(req.headers) || '?'; // safe object to string
var connection = req.connection || {};

@@ -154,3 +155,3 @@ if (options.performLastRequest && connection.lastRequestStarted === false) {

req.connection.lastRequestStarted = true;
connection.lastRequestStarted = true;
return next();

@@ -182,9 +183,10 @@ }

return function checkIfExitingGracefully (req, res, next) {
var connection = req.connection || {};
if (app.settings.graceful_exit === false) {
connection.lastRequestStarted = connection.lastRequestStarted || false;
next();
return next();
}
var connection = req.connection || {};
connection.lastRequestStarted = connection.lastRequestStarted || false;
// Set connection closing header for response, if any. Fix to issue 14, thank you HH

@@ -191,0 +193,0 @@ res.set('Connection', 'close');

2

package.json
{
"name": "express-graceful-exit",
"version": "0.5.0-rc.1",
"version": "0.5.0-rc.2",
"description": "Allow graceful exits for express apps, supporting zero downtime deploys",

@@ -5,0 +5,0 @@ "keywords": [

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