Software /
code /
prosody
Changeset
12300:fb74ff16620c
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 18 Feb 2022 14:25:22 +0100 |
parents | 12299:ff36ac5c7d2b |
children | 12301:4f1fe6eb1ddb |
files | plugins/mod_c2s.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Fri Feb 11 21:41:04 2022 +0100 +++ b/plugins/mod_c2s.lua Fri Feb 18 14:25:22 2022 +0100 @@ -428,7 +428,9 @@ 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