Пример #1
0
        private void FeedConnectionLostHandler()
        {
            _feedHandlerEnabled = false;
            try
            {
                if (_isConnected)
                {
                    //this signifies a reconnection
                    _isConnected = false;

                    if (OnFeedHandlerDisconnected != null)
                    {
                        OnFeedHandlerDisconnected.Invoke();
                    }
                    if (enableReconnecting)
                    {
                        TryReconnecting();
                    }
                }
                else
                {
                    //do nothing, for now
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
        }
Пример #2
0
 public void ConnectionLostHandler()
 {
     try
     {
         if (OnFeedHandlerDisconnected != null)
         {
             OnFeedHandlerDisconnected.Invoke();
         }
     }
     catch (Exception e)
     {
         Console.WriteLine("Connection Lost Handler had a problem disconnecting: " + e.Message);
     }
 }