Diff

net/server_select.lua @ 5492:5d0cc5de5c51

net.server_select: Don't call onconnect twice for SSL connections
author Matthew Wild <mwild1@gmail.com>
date Thu, 18 Apr 2013 00:41:03 +0100
parent 5491:55faa2fd5549
child 5531:483f795f6f99
line wrap: on
line diff
--- 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;