Software /
code /
prosody
Changeset
11226:b3ae48362f78 0.11
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 10 Dec 2020 11:53:10 +0100 |
parents | 11213:992c4498a1e3 |
children | 11227:d36e44d00ef8 11235:1dba335eacea |
files | plugins/mod_s2s/mod_s2s.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua Mon Nov 23 21:52:46 2020 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Thu Dec 10 11:53:10 2020 +0100 @@ -163,7 +163,10 @@ 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);