From d789fea921c6e511ec362fa9628f427e60d7d77e Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Wed, 24 Apr 2024 12:58:46 +0200 Subject: [PATCH] Move counter if blocks to another if block --- svr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svr.js b/svr.js index aad127e..9f88fce 100644 --- a/svr.js +++ b/svr.js @@ -2954,9 +2954,9 @@ if (!cluster.isPrimary) { } else { headWritten = true; } - if (code >= 400 && code <= 499) err4xxcounter++; - if (code >= 500 && code <= 599) err5xxcounter++; if (code >= 400 && code <= 599) { + if (code >= 400 && code <= 499) err4xxcounter++; + else if (code >= 500 && code <= 599) err5xxcounter++; serverconsole.errmessage("Server responded with " + code.toString() + " code."); } else { serverconsole.resmessage("Server responded with " + code.toString() + " code.");