From 397105c519d5739e98925b0523f57e950424c109 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 11 Feb 2010 19:34:23 +0000 Subject: sessionmanager: Fire resource-unbind event after removing session from sessions table --- core/sessionmanager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index 1a7ef175..3122c7b5 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -71,8 +71,6 @@ function destroy_session(session, err) -- Remove session/resource from user's session list if session.full_jid then - hosts[session.host].events.fire_event("resource-unbind", {session=session, error=err}); - hosts[session.host].sessions[session.username].sessions[session.resource] = nil; full_sessions[session.full_jid] = nil; @@ -81,6 +79,8 @@ function destroy_session(session, err) hosts[session.host].sessions[session.username] = nil; bare_sessions[session.username..'@'..session.host] = nil; end + + hosts[session.host].events.fire_event("resource-unbind", {session=session, error=err}); end for k in pairs(session) do -- cgit v1.2.3