aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-02 03:03:44 +0100
committerKim Alvefur <zash@zash.se>2021-12-02 03:03:44 +0100
commit9f3feb39f909922b83fc0a62aabfc5ef94fb5568 (patch)
tree2deabe0082ac3003d1ea4be7662991d1acd924f2 /plugins
parentd34e453ec32ff9f762dac2d11dab4e694f5753dd (diff)
downloadprosody-9f3feb39f909922b83fc0a62aabfc5ef94fb5568.tar.gz
prosody-9f3feb39f909922b83fc0a62aabfc5ef94fb5568.zip
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_smacks.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index f471388f..6eaadf48 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -514,6 +514,9 @@ module:hook("pre-resource-unbind", function (event)
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