plugins/mod_smacks.lua
branch0.12
changeset 13026 a313b7260145
parent 13025 14ca500f8621
child 13027 cbe58f747d48
--- a/plugins/mod_smacks.lua	Sun Apr 02 10:37:44 2023 +0200
+++ b/plugins/mod_smacks.lua	Sun Apr 02 10:40:48 2023 +0200
@@ -474,6 +474,10 @@
 	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?