Comparison

plugins/mod_s2s.lua @ 11683:41b144a93897

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.
author Kim Alvefur <zash@zash.se>
date Wed, 14 Jul 2021 02:39:54 +0200
parent 11682:7843f1ca3b33
child 11684:8b0baf3003fb
comparison
equal deleted inserted replaced
11682:7843f1ca3b33 11683:41b144a93897
257 text = "No viable authentication method offered", 257 text = "No viable authentication method offered",
258 }, nil, "No viable authentication method offered by remote server"); 258 }, nil, "No viable authentication method offered by remote server");
259 return true; 259 return true;
260 end 260 end
261 end, -1); 261 end, -1);
262
263 function module.unload()
264 for _, session in pairs(sessions) do
265 if session.to_host == module.host or session.from_host == module.host then
266 session:close("host-gone");
267 end
268 end
269 end
262 end 270 end
263 271
264 -- Stream is authorised, and ready for normal stanzas 272 -- Stream is authorised, and ready for normal stanzas
265 function mark_connected(session) 273 function mark_connected(session)
266 274