Software /
code /
prosody
Diff
plugins/mod_c2s.lua @ 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 |
parent | 12298:cb459f8fa740 |
child | 12301:4f1fe6eb1ddb |
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