¿Por qué IAsyncResult informa todos los puertos como abiertos?

Tengo este método ejecutándose en un hilo, pero cuando lo pruebo informa que todos los puertos están abiertos. parece que el método:var result = client.BeginConnect(host, port, null, null); no funciona bien al pasar los resultados envar success = result.AsyncWaitHandle.WaitOne(tcpTimeout); ...

¿Alguna idea de cómo resolver eso?

Yo he tratadoclient.ConnectAsync(host,port).Wait(TcpTimeout); pero esto tampoco funciona como se esperaba ...

    public void start()
    {
        Thread thread1 = new Thread(new ThreadStart(RunScanTcp));
        thread1.IsBackground = true;
        thread1.Name = "THREAD ME EMER : " + i;
        thread1.Priority = System.Threading.ThreadPriority.Highest;
        thread1.Start();
   }


public void RunScanTcp()
{
        while (((port = portList.NextPort()) != -1) && (nderprit != true))
        {
            TcpClient client = new TcpClient();
            count = port;
            tcp_count = tcp_count + 1;
            Thread.Sleep(10);
            try
            {
                var mre = new ManualResetEvent(false);
                Console.WriteLine("Current port count : " + port);
                var result = client.BeginConnect(host, port, null, null);
                var success = result.AsyncWaitHandle.WaitOne(tcpTimeout);
                if (success)
                {
                    Console.WriteLine("PORT IS OPEN : " + port);
                    received_tcp = received_tcp + 1;
                    Activity.RunOnUiThread(() =>
                    {

                        mre.Set();
                    });
                    mre.WaitOne();
                    client.Close();
                }
                else
                {
                    client.Close();
                }
            }
            catch (Exception)
            {
                client.Close();
            }
        }
}

Respuestas a la pregunta(1)

Su respuesta a la pregunta