aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-11-18 01:57:21 +0100
committerKim Alvefur <zash@zash.se>2021-11-18 01:57:21 +0100
commit3c57156fb9b3327196e391b513cc906fe9186f2c (patch)
tree27e6a26b4e2b1e3e30b87a1989dea99211b4d797
parentd922bbb1ef53cb46ce084aa89830a0f6d1015bed (diff)
downloadprosody-3c57156fb9b3327196e391b513cc906fe9186f2c.tar.gz
prosody-3c57156fb9b3327196e391b513cc906fe9186f2c.zip
mod_csi_simple: Skip flushing of empty buffer
Just adds noise
-rw-r--r--plugins/mod_csi_simple.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua
index 641182ea..3fbdf314 100644
--- a/plugins/mod_csi_simple.lua
+++ b/plugins/mod_csi_simple.lua
@@ -140,6 +140,8 @@ local function manage_buffer(stanza, session)
end
local function flush_buffer(data, session)
+ local ctr = session.csi_counter or 0;
+ if ctr == 0 then return data end
session.log("debug", "Flushing buffer (%s; queue size is %d)", "client activity", session.csi_counter);
session.state = "flushing";
module:fire_event("csi-flushing", { session = session });