1
0
Fork 0
forked from svrjs/svrjs

Move counter if blocks to another if block

This commit is contained in:
Dorian Niemiec 2024-04-24 12:58:46 +02:00
parent 4f5f96dfdb
commit d789fea921

4
svr.js
View file

@ -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.");