Changeset

11914:8f7946ce7d66

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
author Kim Alvefur <zash@zash.se>
date Tue, 16 Nov 2021 13:53:30 +0100
parents 11913:75d69e4c54a2
children 11915:e0b58717f0c5
files plugins/mod_csi_simple.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_csi_simple.lua	Tue Nov 16 13:37:18 2021 +0100
+++ b/plugins/mod_csi_simple.lua	Tue Nov 16 13:53:30 2021 +0100
@@ -116,6 +116,10 @@
 
 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