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.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