@Override
	public void run() {
		try {
			while (true) {
				@SuppressWarnings("resource")
				Socket socket = mServerSocket.accept();
				try {
					Client client = new Client(this, socket);
					client.setDaemon(true);
					client.start();
					synchronized (mClients) {
						mClients.add(client);
					}
				} catch (IOException ioe) {
					// The client died an early death... ignore it.
					socket.close();
				}
			}
		} catch (Exception exception) {
			shutdown();
		}
		Client[] clients;
		synchronized (mClients) {
			clients = mClients.toArray(new Client[0]);
			mClients.clear();
		}
		for (Client element : clients) {
			element.shutdown();
		}
	}