mod_s2s: Close connections attached to a host being deactivated
Couldn't use those with the host being deactivated.
Problem: This kicks in on reload, which isn't needed.
--- a/plugins/mod_s2s.lua Wed Jul 14 02:41:15 2021 +0200
+++ b/plugins/mod_s2s.lua Wed Jul 14 02:39:54 2021 +0200
@@ -259,6 +259,14 @@
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