# HG changeset patch # User Kim Alvefur # Date 1639955072 -3600 # Node ID 061d516d8ac59503b1ca48adab00eaf4b2273e7f # Parent ad1fe36eaae78befe5aa8b9fde90f9d134df85c1 mod_smacks: Fix error on shutdown if loaded on Component diff -r ad1fe36eaae7 -r 061d516d8ac5 plugins/mod_smacks.lua --- a/plugins/mod_smacks.lua Sun Dec 19 15:00:22 2021 +0100 +++ b/plugins/mod_smacks.lua Mon Dec 20 00:04:32 2021 +0100 @@ -630,6 +630,10 @@ module:hook("c2s-read-timeout", handle_read_timeout); module:hook_global("server-stopping", function(event) + if not local_sessions then + -- not a VirtualHost, no user sessions + return + end local reason = event.reason; -- Close smacks-enaled sessions ourselves instead of letting mod_c2s close -- it, which invalidates the smacks session. This allows preserving the