From 3c57156fb9b3327196e391b513cc906fe9186f2c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 18 Nov 2021 01:57:21 +0100 Subject: mod_csi_simple: Skip flushing of empty buffer Just adds noise --- plugins/mod_csi_simple.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') 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 }); -- cgit v1.2.3