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.
--- 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));