From 797d1592b92cae24c3caff86b8afe4373937c7fc Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 7 Aug 2016 20:51:34 +0200 Subject: mod_c2s: Don't try to keep alive sessions where the stream is not (yet) open --- plugins/mod_c2s.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 71da8773..1b5dd91a 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -294,7 +294,10 @@ function listener.onreadtimeout(conn) end local function keepalive(event) - return event.session.send(' '); + local session = event.session; + if not session.notopen then + return event.session.send(' '); + end end function listener.associate_session(conn, session) -- cgit v1.2.3