net.server_select: Don't call onconnect twice for SSL connections
authorMatthew Wild <mwild1@gmail.com>
Wed, 17 Apr 2013 23:41:03 +0000 (00:41 +0100)
committerMatthew Wild <mwild1@gmail.com>
Wed, 17 Apr 2013 23:41:03 +0000 (00:41 +0100)
net/server_select.lua

index ca80534cda4d5a910d53ad11125ec0eabf3906e9..28f1dc6da1f47db2589e026edb9a36efec0521fb 100644 (file)
@@ -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;