Unverified Kaydet (Commit) f295587c authored tarafından Yury Selivanov's avatar Yury Selivanov Kaydeden (comit) GitHub

bpo-33674: Pause the transport as early as possible (#7192)

üst 3e51a3d5
......@@ -1106,10 +1106,13 @@ class BaseEventLoop(events.AbstractEventLoop):
ssl_handshake_timeout=ssl_handshake_timeout,
call_connection_made=False)
# 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
......
Pause the transport as early as possible to further reduce the risk of
data_received() being called before connection_made().
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment