From da71e8d8689cb8895ef0d0b7e237a9ca27346cf5 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 18 Feb 2024 15:15:47 +0100 Subject: [PATCH] Update to GreenRhomus 1.0.1 --- index.js | 9 ++++++++- mod.info | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e264866..5ec4433 100644 --- a/index.js +++ b/index.js @@ -436,7 +436,14 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e handler = createFastCGIHandler(options); handler.on("error", function (error) { - var errorcode = (error.code == "ENOTFOUND" || error.code == "EHOSTUNREACH" || error.code == "ECONNREFUSED") ? 503 : 500; + var errorcode = 0; + if (error.code == "ENOTFOUND" || error.code == "EHOSTUNREACH" || error.code == "ECONNREFUSED") { + errorcode = 503; + } else if (error.code == "EMFILE") { + errorcode = 429; + } else { + errorcode = 500; + } if (!callServerError) { res.writeHead(errorcode, { "Content-Type": "text/html", diff --git a/mod.info b/mod.info index 5bfc181..826e5a5 100755 --- a/mod.info +++ b/mod.info @@ -1,4 +1,4 @@ { "name": "GreenRhombus FastCGI client for SVR.JS", - "version": "1.0.0" + "version": "1.0.1" }