mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Issue #23197, asyncio: On SSL handshake failure, check if the waiter is
cancelled before setting its exception. * Add unit tests for this case. * Cleanup also sslproto.py
This commit is contained in:
parent
f651a60407
commit
177e9f0855
4 changed files with 65 additions and 7 deletions
|
@ -750,7 +750,7 @@ class _SelectorSslTransport(_SelectorTransport):
|
|||
self._loop.remove_reader(self._sock_fd)
|
||||
self._loop.remove_writer(self._sock_fd)
|
||||
self._sock.close()
|
||||
if self._waiter is not None:
|
||||
if self._waiter is not None and not self._waiter.cancelled():
|
||||
self._waiter.set_exception(exc)
|
||||
if isinstance(exc, Exception):
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue