Closed
Description
Bug report
When creating a asyncio transport/protocol pair, one might want to call transport.pause_reading()
immediately when protocol.connection_made()
is called. This is currently not possible. The call to pause_reading()
is ignored, and reading commences nonetheless.
This is problematic, because there is no other place where the transport can be immediately paused, especially when the protocol is created through loop.create_server
.
As a remedy, I would suggest guarding
cpython/Lib/asyncio/selector_events.py
Lines 931 to 932 in ece20db
with
if not self._paused:
. There might be other places where this is needed, for other event loops.
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Done