fix: service stop timeout #159

This commit is contained in:
leukipp
2025-12-09 15:49:51 +01:00
parent f46649780c
commit f0438d7c88
+7 -1
View File
@@ -126,14 +126,20 @@ const initApp = async () => {
});
// Register process exit events
["SIGINT", "SIGTERM", "SIGQUIT", "SIGTRAP", "exit"].forEach((signal) => {
["SIGINT", "SIGTERM", "SIGQUIT", "exit"].forEach((signal) => {
process.on(signal, () => {
if (APP.exiting) {
return;
}
process.exitCode = 0;
APP.exiting = true;
app.quit();
});
});
powerMonitor.on("shutdown", () => {
if (APP.exiting) {
return;
}
process.exitCode = 0;
APP.exiting = true;
app.quit();