private void OnSessionClosed(object sender, SessionEventArgs e) { var session = sender as IRconSession; if (session != null) { bool restartListening = Sessions.Count == MaxSessions; if (Sessions.Contains(session)) { Sessions.Remove(session); } if (restartListening) { ListeningSocket.BeginAccept(SocketAcceptCallback, this.ListeningSocket); } } }
private void SessionOnClosed(object sender, SessionEventArgs sessionEventArgs) { InvokeSessionClosed(this); }