From fd57818dfbb664a0232b72b4f8caf10c5fa3003c Mon Sep 17 00:00:00 2001 From: Charles-Henri de Boysson Date: Thu, 24 Nov 2022 15:33:30 +0100 Subject: [PATCH] When sending the `Connect` message, use the connection timeout --- kazoo/protocol/connection.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kazoo/protocol/connection.py b/kazoo/protocol/connection.py index ee21c8d6..6de292a1 100644 --- a/kazoo/protocol/connection.py +++ b/kazoo/protocol/connection.py @@ -727,9 +727,7 @@ def _connect(self, host, hostip, port, timeout): client.read_only, ) - connect_result, zxid = self._invoke( - client._session_timeout / 1000.0 / len(client.hosts), connect - ) + connect_result, zxid = self._invoke(timeout, connect) if connect_result.time_out <= 0: raise SessionExpiredError("Session has expired")