From 112e22961793c8b0ee39f2683dcde3d51c5ac9b0 Mon Sep 17 00:00:00 2001 From: yyfyfyang Date: Wed, 29 Mar 2023 14:31:09 +0800 Subject: [PATCH] fix command just recv 8K --- kazoo/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kazoo/client.py b/kazoo/client.py index 27b7c384..a990319c 100644 --- a/kazoo/client.py +++ b/kazoo/client.py @@ -769,7 +769,10 @@ def command(self, cmd=b"ruok"): verify_certs=self.verify_certs, ) sock.sendall(cmd) - result = sock.recv(8192) + result = b"" + temp = sock.recv(8192) + while temp: + result += temp sock.close() return result.decode("utf-8", "replace")