aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-05-01 22:24:13 +0200
committerKim Alvefur <zash@zash.se>2023-05-01 22:24:13 +0200
commit8c6116120bdd0431ef104983e105bcffd0f87266 (patch)
tree700c099205fba34e981dc3a66e2cab6892f52327 /plugins
parent8a854d169b6f7e3f7af0db57da1010ff91c2ab69 (diff)
parent8ef7bc2cf4d430c96e2b9b1876ba406c7c03aba9 (diff)
downloadprosody-8c6116120bdd0431ef104983e105bcffd0f87266.tar.gz
prosody-8c6116120bdd0431ef104983e105bcffd0f87266.zip
Merge 0.12->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_csi_simple.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua
index d48a7d4e..7dcf0326 100644
--- a/plugins/mod_csi_simple.lua
+++ b/plugins/mod_csi_simple.lua
@@ -166,6 +166,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
@@ -177,6 +181,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;