"Разовый" обработчик событий останова сервера приложений

This commit is contained in:
Mikhail Chechnev 2020-02-20 19:53:08 +03:00
parent ad719c678f
commit 401785a795

View File

@ -37,7 +37,7 @@ process.on("exit", code => {
});
["SIGINT", "SIGQUIT", "SIGTERM"].forEach(sSig => {
process.on(sSig, async () => {
process.once(sSig, async () => {
await appSrv.logger.warn(`Получен сигнал на останов сервера приложений: ${sSig}`);
const terminateTimeout = setTimeout(() => {
console.log(