diff --git a/util.js b/util.js index 04c822867..b081078e7 100644 --- a/util.js +++ b/util.js @@ -37,7 +37,8 @@ util.onshutdown = (jobs) => { }; // Attach to the SIGTERM + SIGINT handles to ensure a clean shutdown in the -// event that we have an external event. +// event that we have an external event. SIGUSR2 is called when the app is asked +// to be 'killed', same procedure here. process.on('SIGTERM', () => util.shutdown()); process.on('SIGINT', () => util.shutdown()); process.once('SIGUSR2', () => util.shutdown());