aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-05-01 14:52:38 +0200
committerKim Alvefur <zash@zash.se>2023-05-01 14:52:38 +0200
commit9aecb5cd1998fae1c572e91a319c7610746c74b4 (patch)
tree4a5e51362d53c54aa6295246fd0f7b376de93521 /plugins
parent57c37716145d1383e861c390c4953f41e81dfdb3 (diff)
downloadprosody-9aecb5cd1998fae1c572e91a319c7610746c74b4.tar.gz
prosody-9aecb5cd1998fae1c572e91a319c7610746c74b4.zip
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_csi_simple.lua4
1 files changed, 4 insertions, 0 deletions
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;