aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-09-07 18:33:16 +0200
committerKim Alvefur <zash@zash.se>2019-09-07 18:33:16 +0200
commit4eda545430dc80353a1b168828990e22c73e7a41 (patch)
treef5cd35e88a41a360034774b934ecffd70f901b53 /plugins
parentf6ba50139a104e69aad9378756b927ccc7b2e661 (diff)
downloadprosody-4eda545430dc80353a1b168828990e22c73e7a41.tar.gz
prosody-4eda545430dc80353a1b168828990e22c73e7a41.zip
mod_s2s: Insert s2sin into outgoing routing table when bidirectional
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index 5114b1ce..673c93a2 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -216,6 +216,10 @@ function mark_connected(session)
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 });