aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_smacks.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-18 15:45:06 +0100
committerKim Alvefur <zash@zash.se>2021-12-18 15:45:06 +0100
commitaf3aa001dca130216bb4d5472656e7c683d6e899 (patch)
tree3b787eab70ec44ac3173c3768597e738f0bd9d98 /plugins/mod_smacks.lua
parent549ee95de5f22a323e67cdfc98c62886df153c85 (diff)
downloadprosody-af3aa001dca130216bb4d5472656e7c683d6e899.tar.gz
prosody-af3aa001dca130216bb4d5472656e7c683d6e899.zip
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.
Diffstat (limited to 'plugins/mod_smacks.lua')
-rw-r--r--plugins/mod_smacks.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index c868bf70..ce5580cd 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -504,7 +504,7 @@ function handle_resume(session, stanza, xmlns_sm)
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));