diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 17:13:28 +0100 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 17:13:28 +0100 |
| commit | b92626df5ca72d25236404a0a62cf47279c4e503 (patch) | |
| tree | 14824053cb1cd7139dc8bdf79c089a7662dea48a | |
| parent | 177e9f0855ca398bf208a7466ed288e2ae22f6d5 (diff) | |
| download | cpython-git-b92626df5ca72d25236404a0a62cf47279c4e503.tar.gz | |
Issue #23197: On SSL handshake failure on matching hostname, check if the
waiter is cancelled before setting its exception.
| -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 ca86264886..074a8df04a 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 |
