1
0
Fork 1
mirror of https://example.com synced 2024-11-28 08:26:39 +09:00
This commit is contained in:
syuilo 2021-03-18 13:33:14 +09:00
parent 4f249159d3
commit 9cc8b3656a

View file

@ -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);
}
};
/**