aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-01-19 21:40:09 +0100
committerKim Alvefur <zash@zash.se>2023-01-19 21:40:09 +0100
commitd616d70f3c7b9cb76a488ef69173d6340131bd62 (patch)
tree8dbefd2309f79da4ecff6ef2e5f034dce28000bb
parentb89b219406f266401c975c4745617ac35a0a9499 (diff)
downloadprosody-d616d70f3c7b9cb76a488ef69173d6340131bd62.tar.gz
prosody-d616d70f3c7b9cb76a488ef69173d6340131bd62.zip
core.sessionmanager: Mark session as destroyed to prevent reentry
If it reaches this point, then the session will be most definitely be destroyed, so try to prevent destroy_session() from being called again.
-rw-r--r--core/sessionmanager.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index 60135e1f..ecc829e4 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -106,6 +106,7 @@ local function destroy_session(session, err)
if host_session.events.fire_event("pre-resource-unbind", {session=session, error=err}) then
return;
end
+ session.destroyed = true; -- Past this point the session is DOOMED!
host_session.sessions[session.username].sessions[session.resource] = nil;
full_sessions[session.full_jid] = nil;