private bool ConnectClient(WebSocket webSocket)
        {
            var client = new V8DebugClient(this, webSocket);

            if (Interlocked.CompareExchange(ref activeClient, client, null) == null)
            {
                listener.ConnectClient();
                client.Start();
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        private bool ConnectClient(WebSocket webSocket)
        {
            // ReSharper disable ConditionIsAlwaysTrueOrFalse
            // ReSharper disable HeuristicUnreachableCode

            var client = new V8DebugClient(this, webSocket);

            if (Interlocked.CompareExchange(ref activeClient, client, null) == null)
            {
                listener.ConnectClient();
                client.Start();
                return(true);
            }

            return(false);

            // ReSharper restore HeuristicUnreachableCode
            // ReSharper restore ConditionIsAlwaysTrueOrFalse
        }