Software /
code /
prosody-modules
Changeset
3771:98e1e3ce307d
mod_s2s_keepalive: Invert check to work with bidi connections
When mod_s2s_bidi is active there may be s2sin connections in the s2sout
map, which made this not work correctly.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 23 Dec 2019 01:12:10 +0100 |
parents | 3770:ae34ee0867f0 |
children | 3772:22f02716819f |
files | mod_s2s_keepalive/mod_s2s_keepalive.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_s2s_keepalive/mod_s2s_keepalive.lua Sun Dec 22 15:49:41 2019 +0100 +++ b/mod_s2s_keepalive/mod_s2s_keepalive.lua Mon Dec 23 01:12:10 2019 +0100 @@ -12,7 +12,7 @@ local ping_hosts = {}; for remote_domain, session in pairs(s2sout) do - if session.type == "s2sout" -- as opposed to _unauthed + if session.type ~= "s2sout_unauthed" and (not(keepalive_servers) or keepalive_servers:contains(remote_domain)) then session.sends2s(st.iq({ to = remote_domain, type = "get", from = host, id = "keepalive" }) :tag("ping", { xmlns = "urn:xmpp:ping" }) @@ -21,7 +21,7 @@ end for session in pairs(prosody.incoming_s2s) do - if session.type == "s2sin" -- as opposed to _unauthed + if session.type ~= "s2sin_unauthed" and (not(keepalive_servers) or keepalive_servers:contains(session.from_host)) then if not s2sout[session.from_host] then ping_hosts[session.from_host] = true; end session.sends2s " ";