Changeset

4893:d4ce29c772ac

mod_graceful_shutdown: Close multiplex ports Another way clients might reconnect before the restart has been completed
author Kim Alvefur <zash@zash.se>
date Fri, 11 Feb 2022 16:13:09 +0100
parents 4892:8dbaa5e753f3
children 4894:bfa2cca2bdd5
files mod_graceful_shutdown/mod_graceful_shutdown.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 }