mirror of
https://github.com/gosticks/plane.git
synced 2025-10-16 12:45:33 +00:00
[WIKI-704] fix: disable exiting on unhandled rejection/exception #7902
This commit is contained in:
parent
269fc0d9e0
commit
431af01483
@ -18,26 +18,26 @@ startServer();
|
|||||||
|
|
||||||
// Graceful shutdown on unhandled rejection
|
// Graceful shutdown on unhandled rejection
|
||||||
process.on("unhandledRejection", async (err: Error) => {
|
process.on("unhandledRejection", async (err: Error) => {
|
||||||
logger.error(`UNHANDLED REJECTION! 💥 Shutting down...`, err);
|
logger.error(`UNHANDLED REJECTION!`, err);
|
||||||
try {
|
try {
|
||||||
if (server) {
|
// if (server) {
|
||||||
await server.destroy();
|
// await server.destroy();
|
||||||
}
|
// }
|
||||||
} finally {
|
} finally {
|
||||||
logger.info("Exiting process...");
|
// logger.info("Exiting process...");
|
||||||
process.exit(1);
|
// process.exit(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Graceful shutdown on uncaught exception
|
// Graceful shutdown on uncaught exception
|
||||||
process.on("uncaughtException", async (err: Error) => {
|
process.on("uncaughtException", async (err: Error) => {
|
||||||
logger.error(`UNCAUGHT EXCEPTION! 💥 Shutting down...`, err);
|
logger.error(`UNCAUGHT EXCEPTION!`, err);
|
||||||
try {
|
try {
|
||||||
if (server) {
|
// if (server) {
|
||||||
await server.destroy();
|
// await server.destroy();
|
||||||
}
|
// }
|
||||||
} finally {
|
} finally {
|
||||||
logger.info("Exiting process...");
|
// logger.info("Exiting process...");
|
||||||
process.exit(1);
|
// process.exit(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user