diff options
author | Kim Alvefur <zash@zash.se> | 2019-10-05 16:55:58 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-10-05 16:55:58 +0200 |
commit | a183273abe029f83f6d7104426ee1eec8779d387 (patch) | |
tree | 2fae7595c9933d6179c80cb4f8b5a595fb7f58ba | |
parent | 120baded86a77140148563c67db785f2e4e4b6cd (diff) | |
download | prosody-a183273abe029f83f6d7104426ee1eec8779d387.tar.gz prosody-a183273abe029f83f6d7104426ee1eec8779d387.zip |
mod_csi_simple: Always remove session filters when disabling CSI
Only guard the actual pausing of outgoing data on the method existing.
This prevents the filters from lingering in case something happened to
the connection. Removing already removed filters should be a safe noop.
-rw-r--r-- | plugins/mod_csi_simple.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua index b99aaab3..24a2f1ce 100644 --- a/plugins/mod_csi_simple.lua +++ b/plugins/mod_csi_simple.lua @@ -95,10 +95,10 @@ function enable_optimizations(session) end function disable_optimizations(session) + session.csi_flushing = nil; + filters.remove_filter(session, "stanzas/out", manage_buffer); + filters.remove_filter(session, "bytes/in", flush_buffer); if session.conn and session.conn.resume_writes then - session.csi_flushing = nil; - filters.remove_filter(session, "stanzas/out", manage_buffer); - filters.remove_filter(session, "bytes/in", flush_buffer); session.conn:resume_writes(); end end |