Changeset

12074:b892f5489d79

mod_smacks: Check if session was really sleeping before logging message It could have been resumed without going into hibernation first, i.e. when the client notices the disconnect before the server, or if it switches networks etc.
author Kim Alvefur <zash@zash.se>
date Sat, 18 Dec 2021 15:45:06 +0100
parents 12073:4cbe7979a92a
children 12075:9f4d88f54a54
files plugins/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_smacks.lua	Sat Dec 18 13:58:33 2021 +0100
+++ b/plugins/mod_smacks.lua	Sat Dec 18 15:45:06 2021 +0100
@@ -504,7 +504,7 @@
 			original_session.log("debug", "Letting the watchdog go");
 			original_session.hibernating_watchdog:cancel();
 			original_session.hibernating_watchdog = nil;
-		else
+		elseif session.hibernating then
 			original_session.log("error", "Hibernating session has no watchdog!")
 		end
 		session.log("debug", "mod_smacks resuming existing session %s...", get_session_id(original_session));