RabbitMQ.Client.Impl.ConnectionBase.OnShutdown C# (CSharp) Method

OnShutdown() public method

Broadcasts notification of the final shutdown of the connection.
public OnShutdown ( ) : void
return void
        public void OnShutdown()
        {
            ConnectionShutdownEventHandler handler;
            ShutdownEventArgs reason;
            lock (m_eventLock)
            {
                handler = m_connectionShutdown;
                reason = m_closeReason;
                m_connectionShutdown = null;
            }
            if (handler != null)
            {
                foreach (ConnectionShutdownEventHandler h in handler.GetInvocationList()) {
                    try {
                        h(this, reason);
                    } catch (Exception e) {
                        CallbackExceptionEventArgs args = new CallbackExceptionEventArgs(e);
                        args.Detail["context"] = "OnShutdown";
                        OnCallbackException(args);
                    }
                }
            }
            AppDomain.CurrentDomain.DomainUnload -= HandleDomainUnload;
        }