aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/selector_events.py
diff options
context:
space:
mode:
authorJ. Nick Koston <nick@koston.org>2024-12-05 22:33:03 -0600
committerGitHub <noreply@github.com>2024-12-06 10:03:03 +0530
commite991ac8f2037d78140e417cc9a9486223eb3e786 (patch)
treebd25bcf8877e1efa749fc84b6934f465ed062287 /Lib/asyncio/selector_events.py
parent25eee578c8e369b027da6d9d2725f29df6ef1cbd (diff)
downloadcpython-e991ac8f2037d78140e417cc9a9486223eb3e786.tar.gz
cpython-e991ac8f2037d78140e417cc9a9486223eb3e786.zip
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/selector_events.py')
-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 f94bf10b422..f1ab9b12d69 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