changeset 5281 | 815c689f85ad |
parent 5228 | edabb34417b7 |
child 5370 | 7838acadb0fa |
--- a/plugins/mod_c2s.lua Fri Dec 28 14:33:27 2012 +0100 +++ b/plugins/mod_c2s.lua Fri Dec 28 14:33:47 2012 +0100 @@ -265,6 +265,15 @@ sessions[conn] = session; end +module:hook("server-stopping", function(event) + local reason = event.reason; + for _, session in pairs(sessions) do + session:close{ condition = "system-shutdown", text = reason }; + end +end, 1000); + + + module:provides("net", { name = "c2s"; listener = listener;