Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Commit d4abdd5

Browse files
committed
Add "call_connection_made" arg to SSLProtocol.__init__
1 parent df36d48 commit d4abdd5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

asyncio/sslproto.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ class SSLProtocol(protocols.Protocol):
410410
"""
411411

412412
def __init__(self, loop, app_protocol, sslcontext, waiter,
413-
server_side=False, server_hostname=None):
413+
server_side=False, server_hostname=None,
414+
call_connection_made=True):
414415
if ssl is None:
415416
raise RuntimeError('stdlib ssl module not available')
416417

@@ -443,6 +444,7 @@ def __init__(self, loop, app_protocol, sslcontext, waiter,
443444
self._in_shutdown = False
444445
# transport, ex: SelectorSocketTransport
445446
self._transport = None
447+
self._call_connection_made = call_connection_made
446448

447449
def _wakeup_waiter(self, exc=None):
448450
if self._waiter is None:
@@ -606,7 +608,8 @@ def _on_handshake_complete(self, handshake_exc):
606608
compression=sslobj.compression(),
607609
ssl_object=sslobj,
608610
)
609-
self._app_protocol.connection_made(self._app_transport)
611+
if self._call_connection_made:
612+
self._app_protocol.connection_made(self._app_transport)
610613
self._wakeup_waiter()
611614
self._session_established = True
612615
# In case transport.write() was already called. Don't call

0 commit comments

Comments
 (0)