You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Asyncio: SSL transport does not support set_protocol() #75813
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-10-19.17:50:44.809>created_at=<Date2017-09-29.08:59:33.967>labels= ['type-bug', '3.7', 'expert-asyncio']
title='Asyncio: SSL transport does not support set_protocol()'updated_at=<Date2017-10-19.18:12:46.546>user='https://github.com/jlacoline'
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"
New changeset ea2ef5d by Yury Selivanov (jlacoline) in branch 'master': bpo-31632: fix set_protocol() in _SSLProtocolTransport (bpo-3817) (bpo-3817) ea2ef5d
Activity
jlacoline commentedon Sep 29, 2017
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.
1st1 commentedon Oct 19, 2017
New changeset ea2ef5d by Yury Selivanov (jlacoline) in branch 'master':
bpo-31632: fix set_protocol() in _SSLProtocolTransport (bpo-3817) (bpo-3817)
ea2ef5d
1st1 commentedon Oct 19, 2017
Loïc, thank you for the contribution!
1st1 commentedon Oct 19, 2017
New changeset 9c23b17 by Yury Selivanov (Miss Islington (bot)) in branch '3.6':
bpo-31632: fix set_protocol() in _SSLProtocolTransport (GH-3817) (GH-3817) (bpo-4052)
9c23b17