summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-06-04 15:32:35 (GMT)
committerGitHub <noreply@github.com>2018-06-04 15:32:35 (GMT)
commit9602643120a509858d0bee4215d7f150e6125468 (patch)
tree43f875c7a1437f958994c7f2a3c281c45f8e3d5d /Lib/asyncio/base_events.py
parenta8eb58546b37a7cd5f332f019bb07388f5212c2d (diff)
downloadcpython-9602643120a509858d0bee4215d7f150e6125468.zip
cpython-9602643120a509858d0bee4215d7f150e6125468.tar.gz
cpython-9602643120a509858d0bee4215d7f150e6125468.tar.bz2
bpo-33734: asyncio/ssl: a bunch of bugfixes (#7321)
* Fix AttributeError (not all SSL exceptions have 'errno' attribute) * Increase default handshake timeout from 10 to 60 seconds * Make sure start_tls can be cancelled correctly * Make sure any error in SSLProtocol gets propagated (instead of just being logged)
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 61938e9..34cc625 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -1114,7 +1114,12 @@ class BaseEventLoop(events.AbstractEventLoop):
self.call_soon(ssl_protocol.connection_made, transport)
self.call_soon(transport.resume_reading)
- await waiter
+ try:
+ await waiter
+ except Exception:
+ transport.close()
+ raise
+
return ssl_protocol._app_transport
async def create_datagram_endpoint(self, protocol_factory,