request more bytes at a time when reading JSON

This commit is contained in:
Samuel Sadok
2018-04-21 20:22:30 -07:00
parent f626540494
commit b1f9be531d
+1 -1
View File
@@ -319,7 +319,7 @@ class Channel(PacketSink):
# TODO: handle device that could (maliciously) send infinite stream
buffer = bytes()
while True:
chunk_length = 64
chunk_length = 512
chunk = self.remote_endpoint_operation(endpoint_id, struct.pack("<I", len(buffer)), True, chunk_length)
if (len(chunk) == 0):
break