diff --git a/config.json b/config.json index 3c0abf6..c370392 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "port": 80, "pubport": 80, "page404": "404.html", - "timestamp": 1694195890852, + "timestamp": 1694196507492, "blacklist": [], "nonStandardCodes": [], "enableCompression": true, @@ -102,4 +102,4 @@ "errorPages": [], "useWebRootServerSideScript": true, "exposeModsInErrorPages": true -} +} \ No newline at end of file diff --git a/svr.js b/svr.js index cf5bc0a..7d9eae4 100644 --- a/svr.js +++ b/svr.js @@ -223,28 +223,31 @@ if (!singlethreaded) { function checkSendImplementation(worker) { var sendImplemented = true; - if (!worker.send) { - sendImplemented = false; - } - - var oldLog = console.log; - console.log = function (a,b,c,d,e,f) { - if(a == "ChildProcess.prototype.send() - Sorry! Not implemented yet") { - throw new Error("NOT IMPLEMENTED"); - } else { - oldLog(a,b,c,d,e,f); - } - }; - - try { - worker.send(undefined); - } catch (err) { - if (err.message === "NOT IMPLEMENTED") { + if (!(process.versions && process.versions.bun && process.versions.bun[0] != "0")) { + if (!worker.send) { sendImplemented = false; } - } - console.log = oldLog; + var oldLog = console.log; + console.log = function (a,b,c,d,e,f) { + if(a == "ChildProcess.prototype.send() - Sorry! Not implemented yet") { + throw new Error("NOT IMPLEMENTED"); + } else { + oldLog(a,b,c,d,e,f); + } + }; + + try { + worker.send(undefined); + } catch (err) { + if (err.message === "NOT IMPLEMENTED") { + sendImplemented = false; + } + console.log(err); + } + + console.log = oldLog; + } return sendImplemented; } @@ -5083,7 +5086,6 @@ function start(init) { } if (!cluster.isPrimary && cluster.isPrimary !== undefined) { process.on("message", function (line) { - if(line === undefined) return; // Workaround for Bun 1.0.0 try { if (line == "") { // Does Nothing