aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_smacks.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index b4a0057d..1f1ebd7d 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -440,7 +440,10 @@ module:hook("pre-resource-unbind", function (event)
sessionmanager.destroy_session(session, "Hibernating too long");
end);
if session.conn then
- session.conn:close();
+ local conn = session.conn;
+ c2s_sessions[conn] = nil;
+ session.conn = nil;
+ conn:close();
end
module:fire_event("smacks-hibernation-start", { origin = session; queue = session.outgoing_stanza_queue:table() });
return true; -- Postpone destruction for now