mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
Issue #23197: On SSL handshake failure on matching hostname, check if the
waiter is cancelled before setting its exception.
This commit is contained in:
parent
177e9f0855
commit
b92626df5c
1 changed files with 2 additions and 1 deletions
|
@ -774,7 +774,8 @@ class _SelectorSslTransport(_SelectorTransport):
|
|||
"on matching the hostname",
|
||||
self, exc_info=True)
|
||||
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)
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue