From 08adb69cabaae36f65ce851d075a623b8424c91f Mon Sep 17 00:00:00 2001 From: Cy Brown Date: Tue, 19 May 2015 10:34:28 +0200 Subject: [PATCH] Close tiny lr instead of kill the main process --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 79bc5f5..5d7e468 100644 --- a/index.js +++ b/index.js @@ -38,7 +38,9 @@ module.exports = (function () { debug(info('server process exited with [code => %s | sig => %s]'), code, sig); if(sig !== 'SIGKILL'){ //server stopped unexpectedly - process.exit(0); + if (lr) { + lr.close(); + } } }, @@ -147,4 +149,4 @@ module.exports = (function () { }); } }; -})(); \ No newline at end of file +})();