# HG changeset patch # User Kim Alvefur # Date 1399465184 -7200 # Node ID 7d76dd2310efc4e510199eccbee8018ab4207fe6 # Parent 26a2092e289ff4b8335308fb527f8366b48fd593 mod_smacks: Add more debug logging diff -r 26a2092e289f -r 7d76dd2310ef mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Wed May 07 14:17:03 2014 +0200 +++ b/mod_smacks/mod_smacks.lua Wed May 07 14:19:44 2014 +0200 @@ -91,8 +91,10 @@ end queue[#queue+1] = cached_stanza; + session.log("debug", "#queue = %d", #queue); end if session.hibernating then + session.log("debug", "hibernating, stanza queued") -- The session is hibernating, no point in sending the stanza -- over a dead connection. It will be delivered upon resumption. return true; @@ -204,6 +206,7 @@ for i=1,math_min(handled_stanza_count,#queue) do t_remove(origin.outgoing_stanza_queue, 1); end + origin.log("debug", "#queue = %d", #queue); origin.last_acknowledged_stanza = origin.last_acknowledged_stanza + handled_stanza_count; return true; end @@ -333,9 +336,11 @@ -- Ok, we need to re-send any stanzas that the client didn't see -- ...they are what is now left in the outgoing stanza queue local queue = original_session.outgoing_stanza_queue; + session.log("debug", "#queue = %d", #queue); for i=1,#queue do session.send(queue[i]); end + session.log("debug", "#queue = %d -- after send", #queue); else module:log("warn", "Client %s@%s[%s] tried to resume stream for %s@%s[%s]", session.username or "?", session.host or "?", session.type,