Skip to content

Commit 2549a72

Browse files
authored
Fix process events handler
PR-URL: #1969
1 parent d00aca6 commit 2549a72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

impress.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ const loadApplications = async () => {
198198
}
199199
};
200200

201-
const stop = async (code = 0) => {
201+
const stop = async (signal = 'SIGINT', code = 0) => {
202202
const portsClosed = new Promise((resolve) => {
203203
impress.console.info('Graceful shutdown in worker 0');
204204
const timeout = setTimeout(() => {
@@ -214,7 +214,7 @@ const stop = async (code = 0) => {
214214
broadcast(app, { name: 'stop' });
215215
}
216216
await portsClosed;
217-
exit('Application server stopped', code);
217+
exit(`Application server stopped by ${signal}`, code);
218218
};
219219

220220
process.removeAllListeners('warning');

0 commit comments

Comments
 (0)