mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
server: Exit on unhandled Promise rejection
This commit is contained in:
parent
0ad0160b7c
commit
86ceb2b610
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ exports.start = async () => {
|
|||
}
|
||||
|
||||
process.on('uncaughtException', exports.exit);
|
||||
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
|
||||
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
|
||||
process.on('unhandledRejection', (err) => { throw err; });
|
||||
|
||||
/*
|
||||
* Connect graceful shutdown with sigint and uncaught exception
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue