# HG changeset patch # User Kim Alvefur # Date 1674160809 -3600 # Node ID 0d8bf401fa73c02d37ec79064db439bcb54972a9 # Parent f6cca7cbf3b2d9767cc739b576dad4d068220178 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. diff -r f6cca7cbf3b2 -r 0d8bf401fa73 core/sessionmanager.lua --- a/core/sessionmanager.lua Thu Jan 19 21:38:14 2023 +0100 +++ b/core/sessionmanager.lua Thu Jan 19 21:40:09 2023 +0100 @@ -106,6 +106,7 @@ 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;