# HG changeset patch # User Kim Alvefur # Date 1607597590 -3600 # Node ID b3ae48362f785f99fe1bcfa5e093f52a135fc5f8 # Parent 992c4498a1e33d18a37efbee0502b89f53138f55 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 diff -r 992c4498a1e3 -r b3ae48362f78 plugins/mod_s2s/mod_s2s.lua --- 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);