express-graceful-exit
Advanced tools
Comparing version 0.5.0-rc.1 to 0.5.0-rc.2
@@ -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 @@ ======================= |
@@ -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'); |
{ | ||
"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": [ |
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
15951
166