aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2024-11-02 22:33:38 +0100
committerKim Alvefur <zash@zash.se>2024-11-02 22:33:38 +0100
commit95dddbdea176164b4f88735148a3fb24384570ae (patch)
tree802964661af094be82077440fda18e706470de06
parentad83ddfb78afff7c03d7b749cdf66e39898281c5 (diff)
parent2c61955e3aa384926c02322505e22cb446c333d5 (diff)
downloadprosody-95dddbdea176164b4f88735148a3fb24384570ae.tar.gz
prosody-95dddbdea176164b4f88735148a3fb24384570ae.zip
Merge 0.12->trunk
-rw-r--r--plugins/mod_smacks.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index d4f0f371..7a9a67b3 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -541,11 +541,13 @@ module:hook("pre-resource-unbind", function (event)
return
end
- session.log("debug", "Destroying session for hibernating too long");
- save_old_session(session);
- session.resumption_token = nil;
- sessionmanager.destroy_session(session, "Hibernating too long");
- sessions_expired(1);
+ prosody.main_thread:run(function ()
+ session.log("debug", "Destroying session for hibernating too long");
+ save_old_session(session);
+ session.resumption_token = nil;
+ sessionmanager.destroy_session(session, "Hibernating too long");
+ sessions_expired(1);
+ end);
end);
if session.conn then
local conn = session.conn;