diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 16:56:20 +0100 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 16:56:20 +0100 |
| commit | 177e9f0855ca398bf208a7466ed288e2ae22f6d5 (patch) | |
| tree | 27c994b28ebad69a451db7937c7fed06e37ff37a /Lib/asyncio/selector_events.py | |
| parent | f651a604075c2dc9a2d7f3d3bd74da374ff8a696 (diff) | |
| download | cpython-git-177e9f0855ca398bf208a7466ed288e2ae22f6d5.tar.gz | |
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
Diffstat (limited to 'Lib/asyncio/selector_events.py')
| -rw-r--r-- | Lib/asyncio/selector_events.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py index b2f29c706a..ca86264886 100644 --- a/Lib/asyncio/selector_events.py +++ b/Lib/asyncio/selector_events.py @@ -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 |
