net.server_select: Don't call onconnect twice for SSL connections
authorMatthew Wild <mwild1@gmail.com>
Thu, 18 Apr 2013 00:41:03 +0100
changeset 5492 5d0cc5de5c51
parent 5491 55faa2fd5549
child 5493 307c4b1259b3
child 5494 9916f0a2d178
net.server_select: Don't call onconnect twice for SSL connections
net/server_select.lua
--- a/net/server_select.lua	Thu Apr 18 00:40:09 2013 +0100
+++ b/net/server_select.lua	Thu Apr 18 00:41:03 2013 +0100
@@ -243,7 +243,7 @@
 			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;