This commit is contained in:
Boki 2025-06-20 17:09:49 -04:00
parent afa381e390
commit c048e00d7f
4 changed files with 50 additions and 10 deletions

View file

@ -171,7 +171,7 @@ export class Shutdown {
process.platform === 'win32' ? ['SIGINT', 'SIGTERM'] : ['SIGTERM', 'SIGINT', 'SIGUSR2'];
signals.forEach(signal => {
process.on(signal, () => {
process.once(signal, () => { // Changed from 'on' to 'once' to prevent multiple handlers
this.shutdownAndExit(signal).catch(() => {
process.exit(1);
});