aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_c2s.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-02-18 14:25:22 +0100
committerKim Alvefur <zash@zash.se>2022-02-18 14:25:22 +0100
commit13dc49d1a725b27ddf63dda8a1be170713a374ed (patch)
tree05382992972db35cfbba66c83bab5e376ae3d352 /plugins/mod_c2s.lua
parent14a7fdb2a84dcc7ba07c54ae3613c11f91da4720 (diff)
downloadprosody-13dc49d1a725b27ddf63dda8a1be170713a374ed.tar.gz
prosody-13dc49d1a725b27ddf63dda8a1be170713a374ed.zip
mod_c2s: Close ports in a separate, earlier event from closing sessions
Lets other things step in and do things while c2s ports are closed, e.g. mod_smacks, or other modules with port handlers that forward to c2s.
Diffstat (limited to 'plugins/mod_c2s.lua')
-rw-r--r--plugins/mod_c2s.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 7c5c4182..1a9580fb 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -428,7 +428,9 @@ module:hook("server-stopping", function(event)
for _, netservice in pairs(module.items["net-provider"]) do
pm.unregister_service(netservice.name, netservice);
end
+end, -80);
+module:hook("server-stopping", function(event)
-- Close sessions
local reason = event.reason;
for _, session in pairs(sessions) do