aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_s2s.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index f2a7c850..ca06c281 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -259,6 +259,14 @@ function module.add_host(module)
return true;
end
end, -1);
+
+ function module.unload()
+ for _, session in pairs(sessions) do
+ if session.to_host == module.host or session.from_host == module.host then
+ session:close("host-gone");
+ end
+ end
+ end
end
-- Stream is authorised, and ready for normal stanzas