Commit b92626df authored by Victor Stinner's avatar Victor Stinner

Issue #23197: On SSL handshake failure on matching hostname, check if the

waiter is cancelled before setting its exception.
parent 177e9f08
......@@ -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
......
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