From d4b183bc5fbc58bc52dcf4cd41a3eb2411e01644 Mon Sep 17 00:00:00 2001 From: Rune Date: Fri, 24 Jan 2020 15:25:19 +0100 Subject: [PATCH] Avoid setInterval keeping node process alive --- lib/session-file-helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/session-file-helpers.js b/lib/session-file-helpers.js index 3c22814..67cc5d3 100644 --- a/lib/session-file-helpers.js +++ b/lib/session-file-helpers.js @@ -100,7 +100,7 @@ var helpers = { options.logFn('[session-file-store] Deleting expired sessions'); helpers.reap(options); } - }, options.reapInterval * 1000); + }, options.reapInterval * 1000).unref(); } }, @@ -411,4 +411,4 @@ var helpers = { } }; -module.exports = helpers; \ No newline at end of file +module.exports = helpers;