]> granicus.if.org Git - python/commit
bpo-33674: asyncio: Fix SSLProtocol race (GH-7175) (#7187)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 29 May 2018 01:44:16 +0000 (18:44 -0700)
committerNed Deily <nad@python.org>
Tue, 29 May 2018 01:44:16 +0000 (21:44 -0400)
commit0dd8fd03584b61cd769be88f5a2fb59b0d8f6d18
tree7bd0c480664882514b83cd3d74ad803a2ad8f697
parent420092e255389008b399efa61db300fe44356ee8
bpo-33674: asyncio: Fix SSLProtocol race (GH-7175) (#7187)

Fix a race condition in SSLProtocol.connection_made() of
asyncio.sslproto: start immediately the handshake instead of using
call_soon(). Previously, data_received() could be called before the
handshake started, causing the handshake to hang or fail.
(cherry picked from commit be00a5583a2cb696335c527b921d1868266a42c6)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Lib/asyncio/sslproto.py
Misc/NEWS.d/next/Library/2018-05-28-22-49-59.bpo-33674.6LFFj7.rst [new file with mode: 0644]