Heartbeat defaults and ws guard; format

This commit is contained in:
Peter Steinberger
2025-11-27 18:37:30 +01:00
parent 49ada54f6d
commit 9b3c4db10d
3 changed files with 7 additions and 4 deletions

View File

@@ -119,10 +119,10 @@ const isMain =
if (isMain) {
// Global error handlers to prevent silent crashes from unhandled rejections/exceptions.
// These log the error and exit gracefully instead of crashing without trace.
process.on("unhandledRejection", (reason, promise) => {
process.on("unhandledRejection", (reason, _promise) => {
console.error(
"[warelay] Unhandled promise rejection:",
reason instanceof Error ? reason.stack ?? reason.message : reason,
reason instanceof Error ? (reason.stack ?? reason.message) : reason,
);
process.exit(1);
});