// 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"); }
private void OnAborting(ListenerAbortingEventArgs e) { Aborting?.Invoke(this, e); }