diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 16:13:28 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 16:13:28 (GMT) |
commit | b92626df5ca72d25236404a0a62cf47279c4e503 (patch) | |
tree | 14824053cb1cd7139dc8bdf79c089a7662dea48a /Lib/asyncio | |
parent | 177e9f0855ca398bf208a7466ed288e2ae22f6d5 (diff) | |
download | cpython-b92626df5ca72d25236404a0a62cf47279c4e503.zip cpython-b92626df5ca72d25236404a0a62cf47279c4e503.tar.gz cpython-b92626df5ca72d25236404a0a62cf47279c4e503.tar.bz2 |
Issue #23197: On SSL handshake failure on matching hostname, check if the
waiter is cancelled before setting its exception.
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/selector_events.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py index ca86264..074a8df 100644 --- a/Lib/asyncio/selector_events.py +++ b/Lib/asyncio/selector_events.py @@ -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 |