From 452d2d223c55c7eab964f9fc751fb50fe75a66a5 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 18 Apr 2013 00:39:59 +0100 Subject: Backed out changeset f2631a14b953 --- net/server_select.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/server_select.lua') diff --git a/net/server_select.lua b/net/server_select.lua index f123f4b7..8ce9eed2 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -551,6 +551,9 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport handler.readbuffer = _readbuffer -- when handshake is done, replace the handshake function with regular functions handler.sendbuffer = _sendbuffer _ = status and status( handler, "ssl-handshake-complete" ) + if self.autostart_ssl and listeners.onconnect then + listeners.onconnect(self); + end _readlistlen = addsocket(_readlist, client, _readlistlen) return true else -- cgit v1.2.3 From 62494defe90f0659ce37a62b846f1235526e10d7 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 18 Apr 2013 00:41:03 +0100 Subject: net.server_select: Don't call onconnect twice for SSL connections --- net/server_select.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/server_select.lua') diff --git a/net/server_select.lua b/net/server_select.lua index ca80534c..28f1dc6d 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -243,7 +243,7 @@ wrapserver = function( listeners, socket, ip, serverport, pattern, sslctx ) -- t end connections = connections + 1 out_put( "server.lua: accepted new client connection from ", tostring(ip), ":", tostring(clientport), " to ", tostring(serverport)) - if dispatch then + if dispatch and not sslctx then -- SSL connections will notify onconnect when handshake completes return dispatch( handler ); end return; -- cgit v1.2.3