diff options
author | Kim Alvefur <zash@zash.se> | 2020-12-10 11:53:10 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-12-10 11:53:10 +0100 |
commit | a98a33cfe19a5998b1ef760554be89ddd1b182ff (patch) | |
tree | 4404e45010daa40eedf3bc7d828d81c64da9f803 /plugins | |
parent | fe88da311425cd035eba27a363921175756d7d5d (diff) | |
download | prosody-a98a33cfe19a5998b1ef760554be89ddd1b182ff.tar.gz prosody-a98a33cfe19a5998b1ef760554be89ddd1b182ff.zip |
mod_s2s: Prevent whitespace keepalives the stream has been opened
This will result in the stream timing out instead, which is probably
correct if the stream has not been opened yet.
This was already done for c2s in e69df8093387
Thanks Ge0rG
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 5439aa96..4fce20eb 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -163,7 +163,10 @@ function route_to_new_session(event) end local function keepalive(event) - return event.session.sends2s(' '); + local session = event.session; + if not session.notopen then + return event.session.send(' '); + end end module:hook("s2s-read-timeout", keepalive, -1); |