bpo-33674: Pause the transport as early as possible by 1st1 · Pull Request #7192 · python/cpython
# Pause early so that "ssl_protocol.data_received()" doesn't # have a chance to get called before "ssl_protocol.connection_made()". transport.pause_reading()
transport.set_protocol(ssl_protocol) self.call_soon(ssl_protocol.connection_made, transport) if not transport.is_reading(): self.call_soon(transport.resume_reading) self.call_soon(transport.resume_reading)
await waiter return ssl_protocol._app_transport