Software /
code /
prosody
Comparison
plugins/mod_csi_simple.lua @ 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 |
parent | 11913:75d69e4c54a2 |
child | 11916:5dae9262f81f |
comparison
equal
deleted
inserted
replaced
11913:75d69e4c54a2 | 11914:8f7946ce7d66 |
---|---|
114 { "reason" } | 114 { "reason" } |
115 ); | 115 ); |
116 | 116 |
117 local function manage_buffer(stanza, session) | 117 local function manage_buffer(stanza, session) |
118 local ctr = session.csi_counter or 0; | 118 local ctr = session.csi_counter or 0; |
119 if session.state ~= "inactive" then | |
120 session.csi_counter = ctr + 1; | |
121 return stanza; | |
122 end | |
119 local flush, why = should_flush(stanza, session, ctr); | 123 local flush, why = should_flush(stanza, session, ctr); |
120 if flush then | 124 if flush then |
121 if session.csi_measure_buffer_hold then | 125 if session.csi_measure_buffer_hold then |
122 session.csi_measure_buffer_hold(); | 126 session.csi_measure_buffer_hold(); |
123 session.csi_measure_buffer_hold = nil; | 127 session.csi_measure_buffer_hold = nil; |