# HG changeset patch # User Kim Alvefur # Date 1637075003 -3600 # Node ID 5dae9262f81fe449ed0dbe56a9444543e009e653 # Parent e0b58717f0c5196188d83401ea4247fe781bae1d mod_csi_simple: Detach cleanly from sessions if unloaded while flushing Since it changes the state to "flushing" while doing just that. Attempting to remove the filters from a session that does not have them should be a safe noop. diff -r e0b58717f0c5 -r 5dae9262f81f plugins/mod_csi_simple.lua --- a/plugins/mod_csi_simple.lua Tue Nov 16 15:00:02 2021 +0000 +++ b/plugins/mod_csi_simple.lua Tue Nov 16 16:03:23 2021 +0100 @@ -214,7 +214,7 @@ function module.unload() for _, user_session in pairs(prosody.hosts[module.host].sessions) do for _, session in pairs(user_session.sessions) do - if session.state == "inactive" then + if session.state and session.state ~= "active" then disable_optimizations(session); end end