summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-10-05 23:40:19 (GMT)
committerYury Selivanov <yury@magic.io>2016-10-05 23:40:19 (GMT)
commita88614233ea3a5918e0efe39dc5f51e1394fc9c8 (patch)
tree591374e3d6119e3282e283cad7c15fb169cfcebd /Lib/asyncio
parent996dd4a666a221c65df6712042c37900931ccf14 (diff)
parent92e7c7f99c51419e1b4aa5eaaa22b7aeb6154ffd (diff)
downloadcpython-a88614233ea3a5918e0efe39dc5f51e1394fc9c8.zip
cpython-a88614233ea3a5918e0efe39dc5f51e1394fc9c8.tar.gz
cpython-a88614233ea3a5918e0efe39dc5f51e1394fc9c8.tar.bz2
Merge 3.5 (issue #23749)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/sslproto.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py
index 92d3c4c..991c77b 100644
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -411,7 +411,8 @@ class SSLProtocol(protocols.Protocol):
"""
def __init__(self, loop, app_protocol, sslcontext, waiter,
- server_side=False, server_hostname=None):
+ server_side=False, server_hostname=None,
+ call_connection_made=True):
if ssl is None:
raise RuntimeError('stdlib ssl module not available')
@@ -444,6 +445,7 @@ class SSLProtocol(protocols.Protocol):
self._in_shutdown = False
# transport, ex: SelectorSocketTransport
self._transport = None
+ self._call_connection_made = call_connection_made
def _wakeup_waiter(self, exc=None):
if self._waiter is None:
@@ -607,7 +609,8 @@ class SSLProtocol(protocols.Protocol):
compression=sslobj.compression(),
ssl_object=sslobj,
)
- self._app_protocol.connection_made(self._app_transport)
+ if self._call_connection_made:
+ self._app_protocol.connection_made(self._app_transport)
self._wakeup_waiter()
self._session_established = True
# In case transport.write() was already called. Don't call