// Server
        private void ServerListenerOnAborting(object sender, ListenerAbortingEventArgs e)
        {
            if (_shuttingDown)
            {
                // Shutdown was expected.
                return;
            }

            // Shutdown was unexpected.
            if (e.Exception != null)
            {
                Logger.Error(e.Exception, $"ServerListener aborted with the reason: \"{e.Reason}\".");
            }
            else
            {
                Logger.Error($"ServerListener aborted with the reason: \"{e.Reason}\".");
            }

            Shutdown("ServerListener closed the connection");
        }
Esempio n. 2
0
 private void OnAborting(ListenerAbortingEventArgs e)
 {
     Aborting?.Invoke(this, e);
 }