# HG changeset patch # User Kim Alvefur # Date 1639828253 -3600 # Node ID e662c172ea0f4d07cd9f162fbe34962634695394 # Parent b9e08cbd032b59759600214eac5cc034d6451e42 mod_smacks: Remove references to connection on hibernation Still having the connection on the session may cause unintentional behavior, such as the session being treated as if connected, even tho the connection has been closed. diff -r b9e08cbd032b -r e662c172ea0f plugins/mod_smacks.lua --- a/plugins/mod_smacks.lua Sat Dec 18 12:50:09 2021 +0100 +++ b/plugins/mod_smacks.lua Sat Dec 18 12:50:53 2021 +0100 @@ -440,7 +440,10 @@ 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