aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s
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
commit72c7702ca51a74195b27b73defb112b2b4d67708 (patch)
treef5cd35e88a41a360034774b934ecffd70f901b53 /plugins/mod_s2s
parent976d6ec54b064a9cc0d8b34cc229f4260e17f2bc (diff)
downloadprosody-72c7702ca51a74195b27b73defb112b2b4d67708.tar.gz
prosody-72c7702ca51a74195b27b73defb112b2b4d67708.zip
mod_s2s: Insert s2sin into outgoing routing table when bidirectional
Diffstat (limited to 'plugins/mod_s2s')
-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 });