Home Forums Support Exception on reconnect Reply To: Exception on reconnect

#2777
Anonymous
Inactive

Hi marcF

I also encountered this problem. Even I Creating two connections with different ConnnectionInfo objects ,It’s also occur.The error message is the same.
Attempted to wait for connection establish on a connection that is already shutdown

my Client code like as below :

  
            private void ConnectionStateChange(connection status)
{
            int num = 0;
            int retryCount = 1000;
            int retrySpanInMSecs = 1000;

           
                do
                {
                    try
                    {
                       

                        connection= TCPConnection.GetConnection(connnectionInfo);
                         
                       lblMessage.Text="ok";
                        break;
                    }
                    catch (Exception ex)
                    {
                        num++;
                        if (num < retryCount)
                        {
                            lblMessage.Text="error";
                            Thread.Sleep(retrySpanInMSecs);
                        }
                    }
                }
                while (num < retryCount);
}

Please give me some help

Thanks

Best Regards