Mercurial > prosody-modules
comparison mod_s2s_keepalive/mod_s2s_keepalive.lua @ 4293:edde5905744a
mod_s2s_keepalive: Don't send whitespace keepalives before s2sin stream is open
Could possibly result in whitespace before the XML and stream header,
which isn't allowed by the parser.
Don't think s2sout is affected, as the stream is opened early and
doesn't have to wait for the other end.
Thanks Ge0rG
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 10 Dec 2020 11:57:03 +0100 |
parents | 93a980ac1816 |
children | 15c4eabdcea0 |
comparison
equal
deleted
inserted
replaced
4292:c13b8003ee5c | 4293:edde5905744a |
---|---|
21 end | 21 end |
22 end | 22 end |
23 | 23 |
24 for session in pairs(prosody.incoming_s2s) do | 24 for session in pairs(prosody.incoming_s2s) do |
25 if session.type ~= "s2sin_unauthed" | 25 if session.type ~= "s2sin_unauthed" |
26 and not session.notopen | |
26 and session.to_host == host | 27 and session.to_host == host |
27 and (not(keepalive_servers) or keepalive_servers:contains(session.from_host)) then | 28 and (not(keepalive_servers) or keepalive_servers:contains(session.from_host)) then |
28 if not s2sout[session.from_host] then ping_hosts[session.from_host] = true; end | 29 if not s2sout[session.from_host] then ping_hosts[session.from_host] = true; end |
29 session.sends2s " "; | 30 session.sends2s " "; |
30 -- If the connection is dead, this should make it time out. | 31 -- If the connection is dead, this should make it time out. |