diff options
author | Kim Alvefur <zash@zash.se> | 2024-11-02 22:33:38 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2024-11-02 22:33:38 +0100 |
commit | 95dddbdea176164b4f88735148a3fb24384570ae (patch) | |
tree | 802964661af094be82077440fda18e706470de06 /plugins/mod_smacks.lua | |
parent | ad83ddfb78afff7c03d7b749cdf66e39898281c5 (diff) | |
parent | 2c61955e3aa384926c02322505e22cb446c333d5 (diff) | |
download | prosody-95dddbdea176164b4f88735148a3fb24384570ae.tar.gz prosody-95dddbdea176164b4f88735148a3fb24384570ae.zip |
Merge 0.12->trunk
Diffstat (limited to 'plugins/mod_smacks.lua')
-rw-r--r-- | plugins/mod_smacks.lua | 12 |
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; |