aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-08-26 19:03:23 +0200
committerKim Alvefur <zash@zash.se>2022-08-26 19:03:23 +0200
commitde4b0b6de21dd260c8d3ab39d51bfc551a33c693 (patch)
treea55491e26e2fa6e5c872a6124c002c30f12d8dd6 /plugins
parent9c5aefe7e7a884a3749133e85b3725e1472b471f (diff)
parente38e915ef50ec62f1724ef55018b6b4120988a0d (diff)
downloadprosody-de4b0b6de21dd260c8d3ab39d51bfc551a33c693.tar.gz
prosody-de4b0b6de21dd260c8d3ab39d51bfc551a33c693.zip
Merge 0.12->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_s2s.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index ac3c8d4f..1df3d5ad 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -460,6 +460,7 @@ function stream_callbacks._streamopened(session, attr)
end
if session.type == "s2sin_unauthed" and to and not session.to_host then
session.to_host = to;
+ session.host = to;
elseif to ~= session.to_host then
session:close({ condition = "improper-addressing", text = "New stream 'to' attribute does not match original" });
return;
@@ -885,8 +886,7 @@ end
function listener.onreadtimeout(conn)
local session = sessions[conn];
if session then
- local host = session.host or session.to_host;
- return (hosts[host] or prosody).events.fire_event("s2s-read-timeout", { session = session });
+ return (hosts[session.host] or prosody).events.fire_event("s2s-read-timeout", { session = session });
end
end