Apache.NMS.ActiveMQ.Connection.AsyncOnExceptionHandler C# (CSharp) 메소드

AsyncOnExceptionHandler() 개인적인 메소드

private AsyncOnExceptionHandler ( object error ) : void
error object
리턴 void
        private void AsyncOnExceptionHandler(object error)
        {
            Exception cause = error as Exception;

            MarkTransportFailed(cause);

            try
            {
                this.transport.Dispose();
            }
            catch(Exception ex)
            {
                Tracer.Debug("Caught Exception While disposing of Transport: " + ex);
            }

            this.brokerInfoReceived.countDown();

            IList sessionsCopy = null;
            lock(this.sessions.SyncRoot)
            {
                sessionsCopy = new ArrayList(this.sessions);
            }

            // Use a copy so we don't concurrently modify the Sessions list if the
            // client is closing at the same time.
            foreach(Session session in sessionsCopy)
            {
                try
                {
                    session.Shutdown();
                }
                catch(Exception ex)
                {
                    Tracer.Debug("Caught Exception While disposing of Sessions: " + ex);
                }
            }
        }