test
This commit is contained in:
parent
afa381e390
commit
c048e00d7f
4 changed files with 50 additions and 10 deletions
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue