diff options
author | Kim Alvefur <zash@zash.se> | 2019-03-25 15:20:28 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-03-25 15:20:28 +0100 |
commit | 096ebc3bcfde419b5c9c387f08d9c41c4d65b847 (patch) | |
tree | 99adeb58f83bc8fad0d103c68ef5aaee28c02dff /plugins | |
parent | 5074566d79830e5a6ecba2b13fd9cdad2e1fb902 (diff) | |
download | prosody-096ebc3bcfde419b5c9c387f08d9c41c4d65b847.tar.gz prosody-096ebc3bcfde419b5c9c387f08d9c41c4d65b847.zip |
mod_csi_simple: Include queue size in debug messages
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_csi_simple.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua index c79c56fc..a9148618 100644 --- a/plugins/mod_csi_simple.lua +++ b/plugins/mod_csi_simple.lua @@ -62,10 +62,10 @@ end local function manage_buffer(stanza, session) local ctr = session.csi_counter or 0; if ctr >= queue_size then - session.log("debug", "Queue size limit hit, flushing buffer"); + session.log("debug", "Queue size limit hit, flushing buffer (queue size is %d)", session.csi_counter); session.conn:resume_writes(); elseif module:fire_event("csi-is-stanza-important", { stanza = stanza, session = session }) then - session.log("debug", "Important stanza, flushing buffer"); + session.log("debug", "Important stanza, flushing buffer (queue size is %d)", session.csi_counter); session.conn:resume_writes(); else stanza = with_timestamp(stanza, jid.join(session.username, session.host)) @@ -75,7 +75,7 @@ local function manage_buffer(stanza, session) end local function flush_buffer(data, session) - session.log("debug", "Client sent something, flushing buffer once"); + session.log("debug", "Client sent something, flushing buffer once (queue size is %d)", session.csi_counter); session.conn:resume_writes(); return data; end @@ -112,9 +112,9 @@ end); module:hook("c2s-ondrain", function (event) local session = event.session; if session.state == "inactive" and session.conn and session.conn and session.conn.pause_writes then - session.csi_counter = 0; session.conn:pause_writes(); - session.log("debug", "Buffer flushed, resuming inactive mode"); + session.log("debug", "Buffer flushed, resuming inactive mode (queue size was %d)", session.csi_counter); + session.csi_counter = 0; end end); |