Drain buffer after read
This commit is contained in:
parent
b7e7e868c9
commit
d9a353e505
1 changed files with 1 additions and 0 deletions
|
@ -26,6 +26,7 @@ async def pipe(reader, writer):
|
||||||
try:
|
try:
|
||||||
while not reader.at_eof():
|
while not reader.at_eof():
|
||||||
writer.write(await reader.read(BUFFER_SIZE))
|
writer.write(await reader.read(BUFFER_SIZE))
|
||||||
|
await writer.drain()
|
||||||
finally:
|
finally:
|
||||||
writer.close()
|
writer.close()
|
||||||
|
|
||||||
|
|
Reference in a new issue