diff options
author | Kim Alvefur <zash@zash.se> | 2021-12-18 12:50:09 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-12-18 12:50:09 +0100 |
commit | 585a1aa0c643cdd955ed38fcbd7aebdee11d43c5 (patch) | |
tree | 45ca259ff18568344a3ab6a12f01af02a1ab414c /plugins | |
parent | 0c57e44fd3fb98a07eac80ab73bcc7d69cd79a2f (diff) | |
download | prosody-585a1aa0c643cdd955ed38fcbd7aebdee11d43c5.tar.gz prosody-585a1aa0c643cdd955ed38fcbd7aebdee11d43c5.zip |
mod_smacks: Add more logging
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_smacks.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua index 204b3873..b4a0057d 100644 --- a/plugins/mod_smacks.lua +++ b/plugins/mod_smacks.lua @@ -200,15 +200,21 @@ end module:hook("pre-session-close", function(event) local session = event.session; if session.resumption_token then + session.log("debug", "Revoking resumption token"); session_registry[jid.join(session.username, session.host, session.resumption_token)] = nil; old_session_registry:set(session.username, session.resumption_token, nil); session.resumption_token = nil; + else + session.log("debug", "Session not resumable"); end if session.hibernating_watchdog then + session.log("debug", "Removing sleeping watchdog"); -- If the session is being replaced instead of resume, we don't want the -- old session around to time out and cause trouble for the new session session.hibernating_watchdog:cancel(); session.hibernating_watchdog = nil; + else + session.log("debug", "No watchdog set"); end -- send out last ack as per revision 1.5.2 of XEP-0198 if session.smacks and session.conn and session.handled_stanza_count then @@ -490,8 +496,11 @@ function handle_resume(session, stanza, xmlns_sm) end; else if original_session.hibernating_watchdog then + original_session.log("debug", "Letting the watchdog go"); original_session.hibernating_watchdog:cancel(); original_session.hibernating_watchdog = nil; + else + original_session.log("error", "Hibernating session has no watchdog!") end session.log("debug", "mod_smacks resuming existing session %s...", get_session_id(original_session)); original_session.log("debug", "mod_smacks session resumed from %s...", get_session_id(session)); |