1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-01-23 00:12:16 +00:00

very simple test for SIGINT

This commit is contained in:
Luca Armaroli
2020-09-05 12:41:39 +02:00
parent 29a6fab20b
commit d29bd54d5b

View File

@@ -21,6 +21,11 @@ export function setProcessEvents(): void {
logger.error({ message: msg, fatal: true });
});
process.on('SIGINT', signal => {
logger.error(signal);
process.exit(777);
});
process.on('unhandledRejection', (reason: {} | null | undefined) => {
if (reason instanceof Error) {
logger.error({ message: (reason as Error) });