private void OnConnectionError(object sender, ErrorEventArgs args)
 {
     if (_writeExceptionsToEventLog)
     {
         WriteToEventLog(args.Exception, string.Format("Sender: {0}\n\nCause: {1}", sender, args.Cause));
         throw new ProviderException(EXCEPTION_MESSAGE);
     }
 }
示例#2
0
        private void OnRedisError(object sender, ErrorEventArgs args)
        {
            var success = false;

            while (!success)
            {
                if (ConnectionReady())
                {
                    //recover subscriptions...
                    Subscriptions.Keys.ToList().ForEach(o => _subscriberConnection.Subscribe(o));
                    success = true;
                }
            }
        }
        private void OnConnectionError(object sender, ErrorEventArgs e)
        {
            Trace.TraceError("OnConnectionError - " + e.Cause + ". " + e.Exception.GetBaseException());

            // Change the state to closed and retry connecting
            if (Interlocked.CompareExchange(ref _state,
                                            State.Closed,
                                            State.Connected) == State.Connected)
            {
                // Start buffering any sends that they are preserved
                OnError(0, e.Exception);

                // Retry until the connection reconnects
                ConnectWithRetry();
            }
        }
 private void OnConnectionError(object sender, BookSleeve.ErrorEventArgs e)
 {
     // How do we bubble errors?
 }
 private void OnConnectionError(object sender, ErrorEventArgs args)
 {
     if (_writeExceptionsToEventLog)
         WriteToEventLog(args.Exception, string.Format("Sender: {0}\n\nCause: {1}", sender, args.Cause));
 }
示例#6
0
 private void RedisConnection_Error(object sender, ErrorEventArgs e)
 {
     if (e.IsFatal)
     {
         s_logger.ErrorFormat("Fatal redis error: {0} - {1}", e.Cause, e.Exception);
     }
     else
     {
         s_logger.WarnFormat("Redis error: {0} - {1}", e.Cause, e.Exception);
     }
 }
 private void OnConnectionError(object sender, ErrorEventArgs args)
 {
     if (_writeExceptionsToEventLog)
     {
         WriteToEventLog(args.Exception, string.Format("Sender: {0}\n\nCause: {1}", sender, args.Cause));
         throw new ProviderException(EXCEPTION_MESSAGE);
     }
 }
示例#8
0
        private void OnConnectionError(object sender, ErrorEventArgs e)
        {
            _trace.TraceError("OnConnectionError - " + e.Cause + ". " + e.Exception.GetBaseException());

            AttemptReconnect(e.Exception);
        }
示例#9
0
 static void redis_Error(object sender, BookSleeve.ErrorEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.DarkRed;
     Console.WriteLine("REDIS >> {0}", e.Exception.Message);
     Console.ResetColor();
 }