From 95416f4604e263cb2507e56ccb98e1d3c53e5be4 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 25 Aug 2024 17:58:01 +0200 Subject: [PATCH] Lint out the codebase --- src/handlers/serverErrorHandler.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/handlers/serverErrorHandler.js b/src/handlers/serverErrorHandler.js index 0dfe5ed..0d05f42 100644 --- a/src/handlers/serverErrorHandler.js +++ b/src/handlers/serverErrorHandler.js @@ -19,7 +19,9 @@ function serverErrorHandler(err, isRedirect, server, start) { ); } else { try { - process.send("\x12ERRLIST" + (isRedirect ? attmtsRedir : attmts) + err.code); + process.send( + "\x12ERRLIST" + (isRedirect ? attmtsRedir : attmts) + err.code, + ); } catch (err) { // Probably main process exited } @@ -29,7 +31,8 @@ function serverErrorHandler(err, isRedirect, server, start) { setTimeout(start, 900); } else { try { - if (cluster.isPrimary !== undefined) process.send("\x12ERRCRASH" + err.code); + if (cluster.isPrimary !== undefined) + process.send("\x12ERRCRASH" + err.code); } catch (err) { // Probably main process exited } @@ -50,14 +53,18 @@ process.messageEventListeners.push((worker, serverconsole) => { if (message.indexOf("\x12ERRLIST") == 0) { const tries = parseInt(msg.substring(8, 9)); const errCode = msg.substring(9); - serverconsole.locerrmessage(serverErrorDescs[errCode] ? serverErrorDescs[errCode] : serverErrorDescs["UNKNOWN"]); + serverconsole.locerrmessage( + serverErrorDescs[errCode] + ? serverErrorDescs[errCode] + : serverErrorDescs["UNKNOWN"], + ); serverconsole.locmessage(tries + " attempts left."); } if (message.length >= 9 && msg.indexOf("\x12ERRCRASH") == 0) { const errno = errors[msg.substring(9)]; process.exit(errno !== undefined ? errno : 1); } - } + }; }); module.exports = (serverconsoleO) => {