Skip to content

Commit

Permalink
Fix process events handler
Browse files Browse the repository at this point in the history
PR-URL: #1969
  • Loading branch information
timursevimli authored May 22, 2024
1 parent d00aca6 commit 2549a72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions impress.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const loadApplications = async () => {
}
};

const stop = async (code = 0) => {
const stop = async (signal = 'SIGINT', code = 0) => {
const portsClosed = new Promise((resolve) => {
impress.console.info('Graceful shutdown in worker 0');
const timeout = setTimeout(() => {
Expand All @@ -214,7 +214,7 @@ const stop = async (code = 0) => {
broadcast(app, { name: 'stop' });
}
await portsClosed;
exit('Application server stopped', code);
exit(`Application server stopped by ${signal}`, code);
};

process.removeAllListeners('warning');
Expand Down

0 comments on commit 2549a72

Please sign in to comment.