aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-03-24 22:01:36 +0100
committerKim Alvefur <zash@zash.se>2019-03-24 22:01:36 +0100
commitee003734474622524bcf3eea479e64a6c91f2802 (patch)
tree296a5af7a125988e3434e4ea8110d4529f318398 /plugins
parentdd0258ff779f4ccc4da11a19c344d054ba7f8430 (diff)
downloadprosody-ee003734474622524bcf3eea479e64a6c91f2802.tar.gz
prosody-ee003734474622524bcf3eea479e64a6c91f2802.zip
mod_csi_simple: Improve debug logs by mentioing why the buffer gets flushed
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_csi_simple.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua
index ff1fa86c..2dda1c42 100644
--- a/plugins/mod_csi_simple.lua
+++ b/plugins/mod_csi_simple.lua
@@ -61,7 +61,11 @@ end
local function manage_buffer(stanza, session)
local ctr = session.csi_counter or 0;
- if ctr >= queue_size or module:fire_event("csi-is-stanza-important", { stanza = stanza, session = session }) then
+ if ctr >= queue_size then
+ session.log("debug", "Queue size limit hit, flushing buffer");
+ 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.conn:resume_writes();
else
stanza = with_timestamp(stanza, jid.join(session.username, session.host))