Comparison

plugins/mod_csi_simple.lua @ 11916:5dae9262f81f

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.
author Kim Alvefur <zash@zash.se>
date Tue, 16 Nov 2021 16:03:23 +0100
parent 11914:8f7946ce7d66
child 11918:2dc3bc5e137a
comparison
equal deleted inserted replaced
11915:e0b58717f0c5 11916:5dae9262f81f
212 end 212 end
213 213
214 function module.unload() 214 function module.unload()
215 for _, user_session in pairs(prosody.hosts[module.host].sessions) do 215 for _, user_session in pairs(prosody.hosts[module.host].sessions) do
216 for _, session in pairs(user_session.sessions) do 216 for _, session in pairs(user_session.sessions) do
217 if session.state == "inactive" then 217 if session.state and session.state ~= "active" then
218 disable_optimizations(session); 218 disable_optimizations(session);
219 end 219 end
220 end 220 end
221 end 221 end
222 end 222 end