mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 06:07:37 +03:00
mod_smacks: Fix error on shutdown if loaded on Component
This commit is contained in:
parent
94af122279
commit
1a089b68ec
1 changed files with 4 additions and 0 deletions
|
@ -630,6 +630,10 @@ module:hook("s2s-read-timeout", handle_read_timeout);
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue