plugins/mod_s2s/mod_s2s.lua
changeset 10252 d7cadd118053
parent 10251 5de65f30fe5e
child 10253 790c6ae54dd6
--- a/plugins/mod_s2s/mod_s2s.lua	Sat Sep 07 18:32:29 2019 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua	Sat Sep 07 18:33:16 2019 +0200
@@ -216,6 +216,10 @@
 		end
 
 	else
+		if session.outgoing and not hosts[to].s2sout[from] then
+			session.log("debug", "Setting up to handle route from %s to %s", to, from);
+			hosts[to].s2sout[from] = session; -- luacheck: ignore 122
+		end
 		local host_session = hosts[to];
 		session.send = function(stanza)
 			return host_session.events.fire_event("route/remote", { from_host = to, to_host = from, stanza = stanza });