From b39471e8b87c06a5e0ec04383c03f6d5687a0fc0 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 10 Sep 2023 18:58:05 +0200 Subject: [PATCH] Improve Bun shim --- config.json | 2 +- svr.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 489d4b8..0a7efab 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "port": 80, "pubport": 80, "page404": "404.html", - "timestamp": 1694363783457, + "timestamp": 1694365030044, "blacklist": [], "nonStandardCodes": [], "enableCompression": true, diff --git a/svr.js b/svr.js index 5938ae0..a0bd9b0 100644 --- a/svr.js +++ b/svr.js @@ -289,6 +289,10 @@ if (!singlethreaded) { newWorker.send(message, fakeParam2, fakeParam3, fakeParam4, tries + 1); } }; + } else { + newWorker.on("exit", function () { + delete cluster.workers[newWorker.id]; + }); } cluster.workers[newWorker.id] = newWorker;