mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-131325: fix sendfile fallback implementation to drain data after writing to transport (#131376)
This commit is contained in:
parent
46e88540e6
commit
94f4d87aeb
2 changed files with 2 additions and 1 deletions
|
@ -1295,8 +1295,8 @@ class BaseEventLoop(events.AbstractEventLoop):
|
|||
read = await self.run_in_executor(None, file.readinto, view)
|
||||
if not read:
|
||||
return total_sent # EOF
|
||||
await proto.drain()
|
||||
transp.write(view[:read])
|
||||
await proto.drain()
|
||||
total_sent += read
|
||||
finally:
|
||||
if total_sent > 0 and hasattr(file, 'seek'):
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix sendfile fallback implementation to drain data after writing to transport in :mod:`asyncio`.
|
Loading…
Add table
Add a link
Reference in a new issue