def disconnected(self, client):
        """Call this method when a client disconnected."""
        if client not in self.clients:
            # already disconnected.
            return
        self.clients.remove(client)
        self._log_disconnected(client)
        self._close(client)
Call this method when a client disconnected.