def close(self):
        if self._client is not None:
            self._client.close()
            self._client = None