Comparison

plugins/mod_csi_simple.lua @ 13091:214a679823e8 0.12

mod_csi_simple: Disable revert-to-inactive timer when going to active mode This timer shouldn't kick in in the middle of active mode.
author Kim Alvefur <zash@zash.se>
date Mon, 01 May 2023 15:10:32 +0200
parent 13090:3cea237f9d1d
child 13092:bc46cfe7c037
comparison
equal deleted inserted replaced
13090:3cea237f9d1d 13091:214a679823e8
159 function enable_optimizations(session) 159 function enable_optimizations(session)
160 if session.conn and session.conn.pause_writes then 160 if session.conn and session.conn.pause_writes then
161 session.conn:pause_writes(); 161 session.conn:pause_writes();
162 session.csi_measure_buffer_hold = measure_buffer_hold(); 162 session.csi_measure_buffer_hold = measure_buffer_hold();
163 session.csi_counter = 0; 163 session.csi_counter = 0;
164 if session.csi_resume then
165 timer.stop(session.csi_resume);
166 session.csi_resume = nil;
167 end
164 filters.add_filter(session, "stanzas/out", manage_buffer); 168 filters.add_filter(session, "stanzas/out", manage_buffer);
165 filters.add_filter(session, "bytes/in", flush_buffer); 169 filters.add_filter(session, "bytes/in", flush_buffer);
166 else 170 else
167 session.log("warn", "Session connection does not support write pausing"); 171 session.log("warn", "Session connection does not support write pausing");
168 end 172 end