License: MIT
diff --git a/svr.js b/svr.js
index e510f89..8c31ee2 100644
--- a/svr.js
+++ b/svr.js
@@ -77,7 +77,7 @@ function deleteFolderRecursive(path) {
}
var os = require("os");
-var version = "3.6.3";
+var version = "3.6.4";
var singlethreaded = false;
if (process.versions) process.versions.svrjs = version; //Inject SVR.JS into process.versions
@@ -1233,6 +1233,13 @@ if (!disableMods) {
// If not the master process, create a unique modloader folder name for each worker
modloaderFolderName = ".modloader_w" + Math.floor(Math.random() * 65536);
}
+
+ // Define the temporary server-side JavaScript file name
+ var tempServerSideScriptName = "serverSideScript.js";
+ if (!process.isBun && cluster.isMaster === false) {
+ // If not the master process and it's not Bun, create a unique temporary server-side JavaScript file name for each worker
+ tempServerSideScriptName = ".serverSideScript_w" + Math.floor(Math.random() * 65536) + ".js";
+ }
// Iterate through the list of mod files
for (var i = 0; i < modFiles.length; i++) {
@@ -1342,20 +1349,20 @@ if (!disableMods) {
var modhead = "var readline = require('readline');\r\nvar os = require('os');\r\nvar http = require('http');\r\nvar url = require('url');\r\nvar fs = require('fs');\r\nvar path = require('path');\r\n" + (hexstrbase64 === undefined ? "" : "var hexstrbase64 = require('../hexstrbase64/index.js');\r\n") + (crypto.__disabled__ === undefined ? "var crypto = require('crypto');\r\nvar https = require('https');\r\n" : "") + "var stream = require('stream');\r\nvar customvar1;\r\nvar customvar2;\r\nvar customvar3;\r\nvar customvar4;\r\n\r\nfunction Mod() {}\r\nMod.prototype.callback = function callback(req, res, serverconsole, responseEnd, href, ext, uobject, search, defaultpage, users, page404, head, foot, fd, elseCallback, configJSON, callServerError, getCustomHeaders, origHref, redirect, parsePostData) {\r\nreturn function () {\r\nvar disableEndElseCallbackExecute = false;\r\nfunction filterHeaders(headers){for(var jsn=JSON.stringify(headers,null,2).split('\\n'),njsn=[\"{\"],i=1;i= 7 || err.name == "SyntaxError") throw err;
+ if (i >= 4 || err.name == "SyntaxError") throw err;
// Wait for a short time before retrying
var now = Date.now();
while (Date.now() - now < 2);
diff --git a/tests.html b/tests.html
index e63bb87..0351e6b 100644
--- a/tests.html
+++ b/tests.html
@@ -1,7 +1,7 @@
- SVR.JS 3.6.3 Tests
+ SVR.JS 3.6.4 Tests
- SVR.JS 3.6.3 Tests
+ SVR.JS 3.6.4 Tests
Directory
Directory (with query)