Diff

plugins/mod_s2s/mod_s2s.lua @ 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
parent 11118:ece430d49809
child 11237:49aeae836ad1
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);