diff options
author | Kim Alvefur <zash@zash.se> | 2023-01-19 21:40:09 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-01-19 21:40:09 +0100 |
commit | d616d70f3c7b9cb76a488ef69173d6340131bd62 (patch) | |
tree | 8dbefd2309f79da4ecff6ef2e5f034dce28000bb /core/sessionmanager.lua | |
parent | b89b219406f266401c975c4745617ac35a0a9499 (diff) | |
download | prosody-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.
Diffstat (limited to 'core/sessionmanager.lua')
-rw-r--r-- | core/sessionmanager.lua | 1 |
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; |