◐ Shell
reader mode source ↗
Skip to content

[asyncio] bpo-29743: ssl socket leak during handshake#480

Merged
1st1 merged 3 commits into
python:masterfrom
fafhrd91:ssl-handshake-cancel
Jun 9, 2017
Merged

[asyncio] bpo-29743: ssl socket leak during handshake#480
1st1 merged 3 commits into
python:masterfrom
fafhrd91:ssl-handshake-cancel

Conversation

@fafhrd91

@fafhrd91 fafhrd91 commented Mar 5, 2017

Copy link
Copy Markdown
Contributor

@mention-bot

Copy link
Copy Markdown

@fafhrd91, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Haypo, @1st1, @serhiy-storchaka and @vadmium to be potential reviewers.

@fafhrd91

fafhrd91 commented Mar 5, 2017

Copy link
Copy Markdown
Contributor Author

@fafhrd91

fafhrd91 commented Mar 6, 2017

Copy link
Copy Markdown
Contributor Author

I modified PR. I think aborting transport is better approach. i.e socket with uncompleted handshake is broken and we can not do anything, just drop.

@1st1

1st1 commented Mar 6, 2017

Copy link
Copy Markdown
Member

This is a much better version, I like it.

@Mariatta

Mariatta commented Mar 9, 2017

Copy link
Copy Markdown
Member

Is this for bpo-29743? If so, please prefix the pull request description with it. Thanks :)

@fafhrd91 fafhrd91 changed the title ssl socket leak during handshake Mar 9, 2017
@vstinner vstinner changed the title bpo-29743: ssl socket leak during handshake Mar 9, 2017
vxgmichel added a commit to vxgmichel/cpython that referenced this pull request Jun 11, 2018
This fixes asyncio issue python#480.
The _SelectorDatagramTransport.sendto method has to be modified
so _sock.send is used only if _sock is connected.

It also protects socket.getsockname against OSError in
_SelectorTransport. This might happen on Windows if the socket
is not connected (e.g. for UDP broadcasting).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants