[New-bugs-announce] [issue31632] Asyncio: SSL transport does not support set_protocol()

Loïc Lajeanne report at bugs.python.org
Fri Sep 29 04:59:33 EDT 2017


New submission from Loïc Lajeanne <jean.lacoline at gmail.com>:

The bug was encountered when using the HTTPS client of the aiohttp package. 

Calling the method set_protocol() on a SSL transport (_SSLProtocolTransport) does not have the expected result: the new protocol will never be used (i.e. its data_received() method won't be called). The previous one keeps receiving data.

The problem comes from asyncio/ssl_proto.py:308. In my understanding, _SSLProtocolTransport is modifying its local reference to the protocol but does not modify the reference in SSLProtocol, which is the one that is actually called.
So imo this line should look like "self.ssl_protocol._app_protocol = protocol"

I'll submit a github PR soon to fix this issue.

----------
components: asyncio
messages: 303313
nosy: jlacoline, yselivanov
priority: normal
severity: normal
status: open
title: Asyncio: SSL transport does not support set_protocol()
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31632>
_______________________________________


More information about the New-bugs-announce mailing list