diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 17:12:59 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 17:12:59 +0100 |
commit | e584e52da2da9a62c0aa4e7605d02aed9b8fc02b (patch) | |
tree | eed415d98ee24d23d7cd794a07e57bca54857845 | |
parent | 715607db3f5c67e8d3ca7a5e0e03e2316e232c9b (diff) | |
download | trollius-e584e52da2da9a62c0aa4e7605d02aed9b8fc02b.tar.gz |
Python issue #23197: On SSL handshake failure on matching hostname, check if
the waiter is cancelled before setting its exception.
-rw-r--r-- | asyncio/selector_events.py | 3 |
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 |