From 8ef7bc2cf4d430c96e2b9b1876ba406c7c03aba9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 1 May 2023 15:10:32 +0200 Subject: 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. --- plugins/mod_csi_simple.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua index 39b05b07..fdd1fd6c 100644 --- a/plugins/mod_csi_simple.lua +++ b/plugins/mod_csi_simple.lua @@ -161,6 +161,10 @@ function enable_optimizations(session) session.conn:pause_writes(); session.csi_measure_buffer_hold = measure_buffer_hold(); session.csi_counter = 0; + if session.csi_resume then + timer.stop(session.csi_resume); + session.csi_resume = nil; + end filters.add_filter(session, "stanzas/out", manage_buffer); filters.add_filter(session, "bytes/in", flush_buffer); else -- cgit v1.2.3