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);
     }
 }
Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 3
0
        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();
            }
        }
Ejemplo n.º 4
0
 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));
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 8
0
        private void OnConnectionError(object sender, ErrorEventArgs e)
        {
            _trace.TraceError("OnConnectionError - " + e.Cause + ". " + e.Exception.GetBaseException());

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