summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/misc/before-shutdown.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/misc/before-shutdown.ts b/src/misc/before-shutdown.ts
index 58d0ea5108..8639d42b04 100644
--- a/src/misc/before-shutdown.ts
+++ b/src/misc/before-shutdown.ts
@@ -32,7 +32,9 @@ const shutdownListeners = [];
* @param {function(string)} fn Function to execute on shutdown.
*/
const processOnce = (signals, fn) => {
- return signals.forEach(sig => process.once(sig, fn));
+ for (const sig of signals) {
+ process.once(sig, fn);
+ }
};
/**