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.
This commit is contained in:
Kim Alvefur 2022-02-18 14:25:22 +01:00
parent 14a7fdb2a8
commit 13dc49d1a7

View file

@ -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