mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
server: Only pass err
arg to exports.exit()
The `uncaughtException` event handlers are passed two arguments: error and "origin". The `exports.exit()` argument doesn't expect a second argument.
This commit is contained in:
parent
5b327b63ac
commit
5999d8cd44
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ exports.start = async () => {
|
||||||
stats.gauge('memoryUsage', () => process.memoryUsage().rss);
|
stats.gauge('memoryUsage', () => process.memoryUsage().rss);
|
||||||
stats.gauge('memoryUsageHeap', () => process.memoryUsage().heapUsed);
|
stats.gauge('memoryUsageHeap', () => process.memoryUsage().heapUsed);
|
||||||
|
|
||||||
process.on('uncaughtException', exports.exit);
|
process.on('uncaughtException', (err) => exports.exit(err));
|
||||||
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
|
// 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.
|
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
|
||||||
process.on('unhandledRejection', (err) => { throw err; });
|
process.on('unhandledRejection', (err) => { throw err; });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue