summaryrefslogtreecommitdiff
path: root/asyncio/selector_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-14 16:51:38 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-01-14 16:51:38 +0100
commit715607db3f5c67e8d3ca7a5e0e03e2316e232c9b (patch)
tree030a113c980d7d376d233d699a23cfe5380b4bc2 /asyncio/selector_events.py
parente1eb834ee239ec54998a0b5174e1f0ea33bc4ece (diff)
downloadtrollius-715607db3f5c67e8d3ca7a5e0e03e2316e232c9b.tar.gz
Python issue #23197: On SSL handshake failure, check if the waiter is cancelled
before setting its exception. Add unit tests for this case.
Diffstat (limited to 'asyncio/selector_events.py')
-rw-r--r--asyncio/selector_events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/asyncio/selector_events.py b/asyncio/selector_events.py
index b2f29c7..ca86264 100644
--- a/asyncio/selector_events.py
+++ b/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