mod_smacks: Ensure hibernating session is not connected
Turns out that if you destroy a session from inside prosody, it goes
into hibernation but stays connected and continues processing stanzas.
--- a/plugins/mod_smacks.lua Wed Dec 01 23:18:18 2021 +0100
+++ b/plugins/mod_smacks.lua Thu Dec 02 03:03:44 2021 +0100
@@ -514,6 +514,9 @@
session.log("debug", "Session resumed before hibernation timeout, all is well")
end
end);
+ if session.conn then
+ session.conn:close();
+ end
return true; -- Postpone destruction for now
end
end