Example #1
0
        public void Subscribed()
        {
            int tryCounter = 0;

            while (true)
            {
                try
                {
                    proxy.Subscribed();
                    break;
                }
                catch (Exception)
                {
                    tryCounter++;

                    if (tryCounter.Equals(maxTry))
                    {
                        throw;
                    }

                    Thread.Sleep(sleepTime);
                    OpenChannel();
                }
            }
        }
Example #2
0
        public void Subscribed()
        {
            int tryCounter = 0;

            while (true)
            {
                if (tryCounter.Equals(maxTry))
                {
                    throw new Exception("CASSubscriberProxy: Connection error.");
                }

                try
                {
                    proxy.Subscribed();
                    break;
                }
                catch (Exception)
                {
                    tryCounter++;
                    Thread.Sleep(sleepTime);
                    OpenChannel();
                }
            }
        }