mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 14:17:37 +03:00
mod_csi_simple: Early return on client activity while flushing buffer
Cuts down on log and measurement noise. We only want to do these things here when initiating a flush.
This commit is contained in:
parent
3fb3e86228
commit
349968eb67
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ end
|
||||||
|
|
||||||
local function flush_buffer(data, session)
|
local function flush_buffer(data, session)
|
||||||
local ctr = session.csi_counter or 0;
|
local ctr = session.csi_counter or 0;
|
||||||
if ctr == 0 then return data end
|
if ctr == 0 or session.state == "flushing" then return data end
|
||||||
session.log("debug", "Flushing buffer (%s; queue size is %d)", "client activity", session.csi_counter);
|
session.log("debug", "Flushing buffer (%s; queue size is %d)", "client activity", session.csi_counter);
|
||||||
session.state = "flushing";
|
session.state = "flushing";
|
||||||
module:fire_event("csi-flushing", { session = session });
|
module:fire_event("csi-flushing", { session = session });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue