Changeset

7341:aa94cd27df4d

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 06 Apr 2016 14:50:34 +0200
parents 7338:f8d37227acd7 (current diff) 7340:7dea28dafc49 (diff)
children 7343:1da5a710848d
files net/server_event.lua
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_event.lua	Tue Apr 05 20:54:43 2016 +0200
+++ b/net/server_event.lua	Wed Apr 06 14:50:34 2016 +0200
@@ -730,7 +730,6 @@
 	if res or ( err == "timeout" ) then
 		local ip, port = client:getsockname( )
 		local interface = wrapclient( client, ip, serverport, listener, pattern, sslctx )
-		interface:_start_connection( sslctx )
 		debug( "new connection id:", interface.id )
 		return interface, err
 	else
--- a/plugins/mod_websocket.lua	Tue Apr 05 20:54:43 2016 +0200
+++ b/plugins/mod_websocket.lua	Wed Apr 06 14:50:34 2016 +0200
@@ -291,7 +291,10 @@
 end
 
 local function keepalive(event)
-	return conn:write(build_frame({ opcode = 0x9, }));
+	local session = event.session;
+	if session.open_stream == session_open_stream then
+		return session.conn:write(build_frame({ opcode = 0x9, }));
+	end
 end
 
 module:hook("c2s-read-timeout", keepalive, -0.9);