mod_graceful_shutdown: Close multiplex ports
Another way clients might reconnect before the restart has been
completed
--- a/mod_graceful_shutdown/mod_graceful_shutdown.lua Fri Feb 11 16:11:55 2022 +0100
+++ b/mod_graceful_shutdown/mod_graceful_shutdown.lua Fri Feb 11 16:13:09 2022 +0100
@@ -23,6 +23,11 @@
portman.deactivate("legacy_ssl");
portman.deactivate("c2s_direct_tls");
+ -- Close multiplexing ports to ensure c2s is not reachable via those either
+ portman.deactivate("multiplex");
+ portman.deactivate("multiplex_ssl");
+ portman.deactivate("proxy"); -- mod_net_proxy
+
-- Close all c2s sessions
for _, sess in pairs(prosody.full_sessions) do
sess:close{ condition = "system-shutdown", text = reason }