diff options
author | Kim Alvefur <zash@zash.se> | 2021-11-18 00:39:10 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-11-18 00:39:10 +0100 |
commit | d922bbb1ef53cb46ce084aa89830a0f6d1015bed (patch) | |
tree | 82a17bc619d02b71ad8ab443a5759e31bae4944d | |
parent | ce8107379d68766555cb4b3b7987fc3b3fa9cf73 (diff) | |
download | prosody-d922bbb1ef53cb46ce084aa89830a0f6d1015bed.tar.gz prosody-d922bbb1ef53cb46ce084aa89830a0f6d1015bed.zip |
mod_csi_simple: Fire event when flushing due to client activity
So that the same things happen as when triggered by an outgoing stanza
-rw-r--r-- | plugins/mod_csi_simple.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua index efac1e9d..641182ea 100644 --- a/plugins/mod_csi_simple.lua +++ b/plugins/mod_csi_simple.lua @@ -141,6 +141,8 @@ end 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(); |