mod_admin_telnet: Print a message to open sessions when shutting down, including the reason

This commit is contained in:
Kim Alvefur 2017-02-21 17:34:01 +01:00
parent ef1b01c822
commit d76ff8e08e

View file

@ -1130,6 +1130,12 @@ function def_env.http:list()
return true;
end
module:hook("server-stopping", function(event)
for conn, session in pairs(sessions) do
session.print("Shutting down: "..(event.reason or "unknown reason"));
end
end);
-------------
function printbanner(session)