Mercurial > prosody-hg
changeset 14191:e86ede52bfbe 13.0
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.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 26 May 2026 11:46:45 +0100 |
| parents | 9b0a65e64697 |
| children | e58de351880f de95e133af8e |
| files | plugins/mod_debug_stanzas/watcher.lib.lua |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)
