aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_s2s.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index 1b40f782..4b721237 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -964,6 +964,13 @@ module:hook("server-stopping", function(event)
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