diff options
author | jlacoline <jean.lacoline@gmail.com> | 2017-10-19 17:49:57 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2017-10-19 17:49:57 (GMT) |
commit | ea2ef5d0ca869d4550820ed53bdf56013dbb9546 (patch) | |
tree | 76872b851e52ae297c21afd8e91f00320c3d5769 /Lib/asyncio | |
parent | ce9e62544571e7ade7186697d5dd065fb4c5243f (diff) | |
download | cpython-ea2ef5d0ca869d4550820ed53bdf56013dbb9546.zip cpython-ea2ef5d0ca869d4550820ed53bdf56013dbb9546.tar.gz cpython-ea2ef5d0ca869d4550820ed53bdf56013dbb9546.tar.bz2 |
bpo-31632: fix set_protocol() in _SSLProtocolTransport (#3817) (#3817)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/sslproto.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index 68499e5..53e6d2b 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -293,11 +293,10 @@ class _SSLPipe(object): class _SSLProtocolTransport(transports._FlowControlMixin, transports.Transport): - def __init__(self, loop, ssl_protocol, app_protocol): + def __init__(self, loop, ssl_protocol): self._loop = loop # SSLProtocol instance self._ssl_protocol = ssl_protocol - self._app_protocol = app_protocol self._closed = False def get_extra_info(self, name, default=None): @@ -305,10 +304,10 @@ class _SSLProtocolTransport(transports._FlowControlMixin, return self._ssl_protocol._get_extra_info(name, default) def set_protocol(self, protocol): - self._app_protocol = protocol + self._ssl_protocol._app_protocol = protocol def get_protocol(self): - return self._app_protocol + return self._ssl_protocol._app_protocol def is_closing(self): return self._closed @@ -431,8 +430,7 @@ class SSLProtocol(protocols.Protocol): self._waiter = waiter self._loop = loop self._app_protocol = app_protocol - self._app_transport = _SSLProtocolTransport(self._loop, - self, self._app_protocol) + self._app_transport = _SSLProtocolTransport(self._loop, self) # _SSLPipe instance (None until the connection is made) self._sslpipe = None self._session_established = False |