# HG changeset patch # User Matthew Wild # Date 1779792405 -3600 # Node ID e86ede52bfbe43f28f5ef50f1123f79f89eec244 # Parent 9b0a65e646972b28a2d1bfc6d4e7f2e9cdb2987b mod_debug_stanzas: Only clear active_filters when there are no subscribers This fixes a potential leak when there are multiple concurrent stanza watchers in progress and one quits. diff -r 9b0a65e64697 -r e86ede52bfbe plugins/mod_debug_stanzas/watcher.lib.lua --- a/plugins/mod_debug_stanzas/watcher.lib.lua Tue May 26 01:31:31 2026 -0400 +++ b/plugins/mod_debug_stanzas/watcher.lib.lua Tue May 26 11:46:45 2026 +0100 @@ -59,8 +59,8 @@ if #active_filter.downstream == 0 then filters.remove_filter(session, "stanzas/in", active_filter.filter_in); filters.remove_filter(session, "stanzas/out", active_filter.filter_out); + active_filters[session] = nil; end - active_filters[session] = nil; end local function unsubscribe_all_from_session(session, reason)