From 9aecb5cd1998fae1c572e91a319c7610746c74b4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 1 May 2023 14:52:38 +0200 Subject: mod_csi_simple: Clear delayed active mode timer on disable It should not be there afterwards. Noticed that it seems to fire some time after resumption claiming that the queue size is nil, implying that it may hold a reference to an expired session somehow. --- 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 569916b0..39b05b07 100644 --- a/plugins/mod_csi_simple.lua +++ b/plugins/mod_csi_simple.lua @@ -172,6 +172,10 @@ function disable_optimizations(session) filters.remove_filter(session, "stanzas/out", manage_buffer); filters.remove_filter(session, "bytes/in", flush_buffer); session.csi_counter = nil; + if session.csi_resume then + timer.stop(session.csi_resume); + session.csi_resume = nil; + end if session.csi_measure_buffer_hold then session.csi_measure_buffer_hold(); session.csi_measure_buffer_hold = nil; -- cgit v1.2.3