BF2Statistics.Gamespy.ServerListRetrieveSocket.MasterClient_OnDisconnect C# (CSharp) Method

MasterClient_OnDisconnect() private method

Callback for when a connection had disconnected
private MasterClient_OnDisconnect ( MasterClient client ) : void
client MasterClient
return void
        private void MasterClient_OnDisconnect(MasterClient client)
        {
            // Remove client, and call OnUpdate Event
            try
            {
                // Release this stream's AsyncEventArgs to the object pool
                base.Release(client.Stream);

                // Remove client from online list
                if (Clients.TryRemove(client.ConnectionId, out client) && !client.Disposed)
                    client.Dispose();
            }
            catch (Exception e)
            {
                Program.ErrorLog.Write("An Error occured at [MasterServer.OnDisconnect] : Generating Exception Log");
                ExceptionHandler.GenerateExceptionLog(e);
            }
        }