summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/selector_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-14 15:56:20 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-14 15:56:20 (GMT)
commit177e9f0855ca398bf208a7466ed288e2ae22f6d5 (patch)
tree27c994b28ebad69a451db7937c7fed06e37ff37a /Lib/asyncio/selector_events.py
parentf651a604075c2dc9a2d7f3d3bd74da374ff8a696 (diff)
downloadcpython-177e9f0855ca398bf208a7466ed288e2ae22f6d5.zip
cpython-177e9f0855ca398bf208a7466ed288e2ae22f6d5.tar.gz
cpython-177e9f0855ca398bf208a7466ed288e2ae22f6d5.tar.bz2
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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index b2f29c7..ca86264 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