private void DoClientStopped(ISocketClient client) { Guard.Execute(() => { OnStop(client); lock (Clients) { Clients.Remove(client.Id); } (client as SocketClient).Dispose(); }); }