mod_smacks: Fix duplicate sleep behavior when replacing a session
authorKim Alvefur <zash@zash.se>
Sat, 18 Dec 2021 13:48:57 +0100
changeset 12076 ef0f174488af
parent 12075 85c8fcb4192e
child 12077 4cbe7979a92a
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.
plugins/mod_smacks.lua
--- a/plugins/mod_smacks.lua	Sat Dec 18 13:43:57 2021 +0100
+++ b/plugins/mod_smacks.lua	Sat Dec 18 13:48:57 2021 +0100
@@ -419,6 +419,7 @@
 		end
 		return
 	end
+	if session.hibernating then return end
 
 	session.hibernating = os_time();
 	session.hibernating_watchdog = watchdog.new(resume_timeout, function()