aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-18 13:48:57 +0100
committerKim Alvefur <zash@zash.se>2021-12-18 13:48:57 +0100
commiteb65a8b39a9cbc1284d4b0ec44e76dc7ea46c0d5 (patch)
treea5755f983df39376d2a1dc976f558c967570022e /plugins
parent6c98ee025ee01c1cf25eb9f45ae032a1a03cdda0 (diff)
downloadprosody-eb65a8b39a9cbc1284d4b0ec44e76dc7ea46c0d5.tar.gz
prosody-eb65a8b39a9cbc1284d4b0ec44e76dc7ea46c0d5.zip
mod_smacks: Fix duplicate sleep behavior when replacing a session
Fixes that an extra watchdog was set, leaking the previous one, which went on to do behave as if the session times out.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_smacks.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index 1f1ebd7d..ce757707 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -419,6 +419,7 @@ module:hook("pre-resource-unbind", function (event)
end
return
end
+ if session.hibernating then return end
session.hibernating = os_time();
session.hibernating_watchdog = watchdog.new(resume_timeout, function()