try reading a complete chunk

This commit is contained in:
Arturo Hernandez 2018-06-06 17:42:43 -04:00
parent 450e448713
commit 199aa96aeb

View File

@ -1420,7 +1420,10 @@ class ZK(object):
for _retries in range(3): for _retries in range(3):
command = 1504 #CMD_READ_BUFFER command = 1504 #CMD_READ_BUFFER
command_string = pack('<ii', start, size) command_string = pack('<ii', start, size)
response_size = 1024 + 8 if self.tcp:
response_size = size + 32
else:
response_size = 1024 + 8
cmd_response = self.__send_command(command, command_string, response_size) cmd_response = self.__send_command(command, command_string, response_size)
data = self.__recieve_chunk() data = self.__recieve_chunk()
if data is not None: if data is not None: