From 013575bf514933c8ceb142146c3bc841d45a03bc Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 10 Feb 2024 06:54:03 +0000 Subject: ignore socket errors --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index 2bf9874e..c2f70c4c 100644 --- a/index.js +++ b/index.js @@ -111,5 +111,6 @@ let port = process.env.PORT || 3119; app.listen({ host, port }); -process.on("unhandledRejection", console.log) -process.on("uncaughtException", console.log) +let logerr = (e) => e.message.startsWith("MASK") || console.log(e); +process.on("unhandledRejection", logerr); +process.on("uncaughtException", logerr); -- cgit v1.2.3