mod_c2s: Don't try to keep alive sessions where the stream is not (yet) open
authorKim Alvefur <zash@zash.se>
Sun, 07 Aug 2016 20:51:34 +0200
changeset 7543 e69df8093387
parent 7542 366964dbddb1
child 7544 1d3f9da189b5
mod_c2s: Don't try to keep alive sessions where the stream is not (yet) open
plugins/mod_c2s.lua
--- a/plugins/mod_c2s.lua	Sun Aug 07 20:50:56 2016 +0200
+++ b/plugins/mod_c2s.lua	Sun Aug 07 20:51:34 2016 +0200
@@ -294,7 +294,10 @@
 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)