From ce046d40e59645b90750f676986c2436b53c1f42 Mon Sep 17 00:00:00 2001 From: Shaun Date: Sun, 1 May 2022 19:56:08 +0200 Subject: [PATCH 1/2] bug #1915: Fixed an issue causing threads to not be destroyed when rezoning from instanced threads --- src/server/world/atlas.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/world/atlas.js b/src/server/world/atlas.js index 9d3cb62c..869353b4 100644 --- a/src/server/world/atlas.js +++ b/src/server/world/atlas.js @@ -264,6 +264,11 @@ module.exports = { rezone: async function (thread, message) { const { args: { obj, newZone, keepPos = true } } = message; + if (thread.instanced) { + thread.worker.kill(); + this.threads.spliceWhere(t => t === thread); + } + //When messages are sent from map threads, they have an id (id of the object in the map thread) // as well as a serverId (id of the object in the main thread) const serverId = obj.serverId; From fc96ab3390ac72e2696fe98a43a6477fa59b7586 Mon Sep 17 00:00:00 2001 From: Shaun Date: Mon, 2 May 2022 21:00:44 +0200 Subject: [PATCH 2/2] bug --- src/server/security/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/security/router.js b/src/server/security/router.js index 9c0dc02c..07a943ec 100644 --- a/src/server/security/router.js +++ b/src/server/security/router.js @@ -153,7 +153,7 @@ module.exports = { const result = this.signatureCorrect(msg, signature); if (!result || msg.cpn !== 'player' || msg.method !== 'performAction') { - if (result && signature.allowWhenIngame === false && source.name !== undefined) + if (result && signature.allowWhenIngame === false && source?.name !== undefined) return false; return result;