aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-20 00:04:32 +0100
committerKim Alvefur <zash@zash.se>2021-12-20 00:04:32 +0100
commit1a089b68ec3044a00a06dcbb3ead98c6d1dd598b (patch)
treed584e59bd4739221852ae8923d80058c6a8e8027 /plugins
parent94af12227904fe6eac8efce38eed8b9d23037e37 (diff)
downloadprosody-1a089b68ec3044a00a06dcbb3ead98c6d1dd598b.tar.gz
prosody-1a089b68ec3044a00a06dcbb3ead98c6d1dd598b.zip
mod_smacks: Fix error on shutdown if loaded on Component
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_smacks.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index e8a52f99..caccb38a 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -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