8000 [3.6] bpo-33674: asyncio: Fix SSLProtocol race (GH-7175) by vstinner · Pull Request #7188 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

10000 Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/asyncio/sslproto.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def _start_handshake(self):
# (b'', 1) is a special value in _process_write_backlog() to do
# the SSL handshake
self._write_backlog.append((b'', 1))
self._loop.call_soon(self._process_write_backlog)
self._process_write_backlog()

def _on_handshake_complete(self, handshake_exc):
self._in_handshake = False
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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.
0