From f337a4a95fe823efcd7c963b76b811ae4e3046d4 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 22 Feb 2024 15:26:56 -0800 Subject: [PATCH] Revert "Fix possible endless wait in stop() after AUTH_FAILED error (#688)" This reverts commit 5225b3e2fab6fec3b12b789e3cc6f3218429d32d. --- kazoo/protocol/connection.py | 2 +- kazoo/tests/test_client.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/kazoo/protocol/connection.py b/kazoo/protocol/connection.py index cee425a2..ad4f3b1f 100644 --- a/kazoo/protocol/connection.py +++ b/kazoo/protocol/connection.py @@ -619,7 +619,7 @@ def _connect_attempt(self, host, hostip, port, retry): self.ping_outstanding.clear() last_send = time.monotonic() with self._socket_error_handling(): - while not self.client._stopped.is_set(): + while True: # Watch for something to read or send jitter_time = random.randint(1, 40) / 100.0 deadline = last_send + read_timeout / 2.0 - jitter_time diff --git a/kazoo/tests/test_client.py b/kazoo/tests/test_client.py index 178a4452..e376baaf 100644 --- a/kazoo/tests/test_client.py +++ b/kazoo/tests/test_client.py @@ -258,8 +258,6 @@ def test_async_auth_failure(self): with pytest.raises(AuthFailedError): client.add_auth("unknown-scheme", digest_auth) - client.stop() - def test_add_auth_on_reconnect(self): client = self._get_client() client.start()