summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorJ. Nick Koston <nick@koston.org>2024-12-06 04:33:03 (GMT)
committerGitHub <noreply@github.com>2024-12-06 04:33:03 (GMT)
commite991ac8f2037d78140e417cc9a9486223eb3e786 (patch)
treebd25bcf8877e1efa749fc84b6934f465ed062287 /Lib/asyncio
parent25eee578c8e369b027da6d9d2725f29df6ef1cbd (diff)
downloadcpython-e991ac8f2037d78140e417cc9a9486223eb3e786.zip
cpython-e991ac8f2037d78140e417cc9a9486223eb3e786.tar.gz
cpython-e991ac8f2037d78140e417cc9a9486223eb3e786.tar.bz2
gh-127655: Ensure `_SelectorSocketTransport.writelines` pauses the protocol if needed (#127656)
Ensure `_SelectorSocketTransport.writelines` pauses the protocol if it reaches the high water mark as needed. Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/selector_events.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index f94bf10..f1ab9b1 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -1175,6 +1175,7 @@ class _SelectorSocketTransport(_SelectorTransport):
# If the entire buffer couldn't be written, register a write handler
if self._buffer:
self._loop._add_writer(self._sock_fd, self._write_ready)
+ self._maybe_pause_protocol()
def can_write_eof(self):
return True