From 6ca01c40ab3a609671efd252ac6a96561b9eb12c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 21 Feb 2017 17:34:01 +0100 Subject: mod_admin_telnet: Print a message to open sessions when shutting down, including the reason --- plugins/mod_admin_telnet.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index c73870f3..b24adcf9 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -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) -- cgit v1.2.3