summaryrefslogtreecommitdiff
path: root/asyncio/selector_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'asyncio/selector_events.py')
-rw-r--r--asyncio/selector_events.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/asyncio/selector_events.py b/asyncio/selector_events.py
index ca86264..074a8df 100644
--- a/asyncio/selector_events.py
+++ b/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