From d616d70f3c7b9cb76a488ef69173d6340131bd62 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 19 Jan 2023 21:40:09 +0100 Subject: 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. --- core/sessionmanager.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'core') 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; -- cgit v1.2.3