diff options
author | John McLear <john@mclear.co.uk> | 2013-03-27 12:06:30 -0700 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-03-27 12:06:30 -0700 |
commit | c6041bf0c2888fba7b8365e0f828ca7b00a2dd82 (patch) | |
tree | 86516a5ea976cb0f9e32511bd6bdd0d63a8855d2 /src/node/hooks/express | |
parent | 09b32ea6946d538f04b4b48fb2371a3057ebcdb9 (diff) | |
parent | ac0018cdfafa8b8b5de594ff9127c190d20f3f63 (diff) | |
download | etherpad-lite-c6041bf0c2888fba7b8365e0f828ca7b00a2dd82.zip |
Merge pull request #1675 from ether/fix/process-uncaughtException-event-handler-leak
Don't leak event listeners for process:uncaughtException
Diffstat (limited to 'src/node/hooks/express')
-rw-r--r-- | src/node/hooks/express/errorhandling.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/node/hooks/express/errorhandling.js b/src/node/hooks/express/errorhandling.js index 3c595683..825c5f3b 100644 --- a/src/node/hooks/express/errorhandling.js +++ b/src/node/hooks/express/errorhandling.js @@ -28,6 +28,7 @@ exports.gracefulShutdown = function(err) { }, 3000); } +process.on('uncaughtException', exports.gracefulShutdown); exports.expressCreateServer = function (hook_name, args, cb) { exports.app = args.app; @@ -47,6 +48,4 @@ exports.expressCreateServer = function (hook_name, args, cb) { //https://github.com/joyent/node/issues/1553 process.on('SIGINT', exports.gracefulShutdown); } - - process.on('uncaughtException', exports.gracefulShutdown); -} +}
\ No newline at end of file |