Merge 41585aed51 into b5addb64f0
This commit is contained in:
commit
70a27e0a74
@ -61,7 +61,11 @@ class IteratorByteStream(SyncByteStream):
|
||||
else:
|
||||
# Otherwise iterate.
|
||||
for part in self._stream:
|
||||
yield part
|
||||
# For bytes types, should use yield to send data in
|
||||
# chunks. Sending a very large part at once will
|
||||
# result in extremely slow transmission.
|
||||
for i in range(0, len(part), self.CHUNK_SIZE):
|
||||
yield part[i : i + self.CHUNK_SIZE]
|
||||
|
||||
|
||||
class AsyncIteratorByteStream(AsyncByteStream):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user