Software /
code /
prosody
Changeset
11918:2dc3bc5e137a
mod_csi_simple: Fire event when flushing due to client activity
So that the same things happen as when triggered by an outgoing stanza
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Nov 2021 00:39:10 +0100 |
parents | 11917:d27b74b25105 |
children | 11919:fae5441fc6cf |
files | plugins/mod_csi_simple.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_csi_simple.lua Tue Nov 16 16:06:41 2021 +0100 +++ b/plugins/mod_csi_simple.lua Thu Nov 18 00:39:10 2021 +0100 @@ -141,6 +141,8 @@ local function flush_buffer(data, session) 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 }); flush_reasons:with_labels("client activity"):add(1); if session.csi_measure_buffer_hold then session.csi_measure_buffer_hold();