# HG changeset patch # User Kim Alvefur # Date 1644612064 -3600 # Node ID ff36ac5c7d2ba53de3f3b8bdfa2b000e785c71cf # Parent cb459f8fa740b846e922c3d6025a977a381e9984 mod_s2s: Disable creation of new outgoing connections during shutdown diff -r cb459f8fa740 -r ff36ac5c7d2b plugins/mod_s2s.lua --- a/plugins/mod_s2s.lua Fri Feb 11 21:36:53 2022 +0100 +++ b/plugins/mod_s2s.lua Fri Feb 11 21:41:04 2022 +0100 @@ -964,6 +964,13 @@ pm.unregister_service(netservice.name, netservice); end + -- Stop opening new connections + for host in pairs(prosody.hosts) do + if prosody.hosts[host].modules.s2s then + module:context(host):unhook("route/remote", route_to_new_session); + end + end + -- Close sessions local reason = event.reason; for _, session in pairs(sessions) do