# HG changeset patch # User Matthew Wild # Date 1265916863 0 # Node ID d540a75a11db87354a76a256c2a72432c58e9dd8 # Parent 2d7e2a28d1d5d04ebde304947d2a7aebd891d8aa sessionmanager: Fire resource-unbind event after removing session from sessions table diff -r 2d7e2a28d1d5 -r d540a75a11db core/sessionmanager.lua --- a/core/sessionmanager.lua Thu Feb 11 18:49:17 2010 +0000 +++ b/core/sessionmanager.lua Thu Feb 11 19:34:23 2010 +0000 @@ -71,8 +71,6 @@ -- 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 @@ 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