BF2Statistics.Gamespy.GpcmServer.GpcmClient_OnDisconnect C# (CSharp) Method

GpcmClient_OnDisconnect() private method

Callback for when a connection had disconnected
private GpcmClient_OnDisconnect ( GpcmClient client ) : void
client GpcmClient The client object whom is disconnecting
return void
        private void GpcmClient_OnDisconnect(GpcmClient client)
        {
            // Remove client, and call OnUpdate Event
            try
            {
                // Remove client from online list
                if (Clients.TryRemove(client.PlayerId, out client) && !client.Disposed)
                    client.Dispose();

                // Call Event
                OnClientsUpdate(this, EventArgs.Empty);
            }
            catch (Exception e)
            {
                Program.ErrorLog.Write("An Error occured at [GpcmServer.GpcmClient_OnDisconnect] : Generating Exception Log");
                ExceptionHandler.GenerateExceptionLog(e);
            }
        }