diff options
author | Kim Alvefur <zash@zash.se> | 2021-11-16 13:53:30 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-11-16 13:53:30 +0100 |
commit | 62c74a6ad33448812739e91a3dadccddc9637d59 (patch) | |
tree | 8f22eb9f7459b08831e11b2374cf0270499c8cf2 /plugins/mod_csi_simple.lua | |
parent | 49e86e78c527c25b1fa195c2a4dd22b9bca222ca (diff) | |
download | prosody-62c74a6ad33448812739e91a3dadccddc9637d59.tar.gz prosody-62c74a6ad33448812739e91a3dadccddc9637d59.zip |
mod_csi_simple: Only act in inactive mode to prevent infinite recursion
Definitely should not be firing an event that triggers like csi-flushing
from which it may make sense to send things, which leads right back here
Diffstat (limited to 'plugins/mod_csi_simple.lua')
-rw-r--r-- | plugins/mod_csi_simple.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua index a3e08264..f5b5c808 100644 --- a/plugins/mod_csi_simple.lua +++ b/plugins/mod_csi_simple.lua @@ -116,6 +116,10 @@ local flush_reasons = module:metric( local function manage_buffer(stanza, session) local ctr = session.csi_counter or 0; + if session.state ~= "inactive" then + session.csi_counter = ctr + 1; + return stanza; + end local flush, why = should_flush(stanza, session, ctr); if flush then if session.csi_measure_buffer_hold then |