From 13dc49d1a725b27ddf63dda8a1be170713a374ed Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 18 Feb 2022 14:25:22 +0100 Subject: 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. --- plugins/mod_c2s.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/mod_c2s.lua') 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 -- cgit v1.2.3