aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_smacks.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_smacks.lua')
-rw-r--r--plugins/mod_smacks.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index 756e2d9a..e0a7bbfb 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -474,6 +474,10 @@ module:hook("pre-resource-unbind", function (event)
if session.hibernating then return end
session.hibernating = os_time();
+ if session.hibernating_watchdog then
+ session.log("debug", "Session already has a sleeping watchdog, replacing it");
+ session.hibernating_watchdog:cancel();
+ end
session.hibernating_watchdog = watchdog.new(resume_timeout, function(this_dog)
if this_dog ~= session.hibernating_watchdog then
-- This really shouldn't happen?