diff options
author | Kim Alvefur <zash@zash.se> | 2022-02-18 14:25:22 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-02-18 14:25:22 +0100 |
commit | 13dc49d1a725b27ddf63dda8a1be170713a374ed (patch) | |
tree | 05382992972db35cfbba66c83bab5e376ae3d352 | |
parent | 14a7fdb2a84dcc7ba07c54ae3613c11f91da4720 (diff) | |
download | prosody-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.
-rw-r--r-- | plugins/mod_c2s.lua | 2 |
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 |