aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-11 19:34:23 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-11 19:34:23 +0000
commit397105c519d5739e98925b0523f57e950424c109 (patch)
tree9079ce94a0db32e04c2721d269b4537b9d24fd19 /core
parent6269a3bf52d14d3082dd41480f93cf4b3ddc0a46 (diff)
downloadprosody-397105c519d5739e98925b0523f57e950424c109.tar.gz
prosody-397105c519d5739e98925b0523f57e950424c109.zip
sessionmanager: Fire resource-unbind event after removing session from sessions table
Diffstat (limited to 'core')
-rw-r--r--core/sessionmanager.lua4
1 files changed, 2 insertions, 2 deletions
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