[asyncio] bpo-29743: ssl socket leak during handshake by fafhrd91 · Pull Request #480 · python/cpython

1st1

@fafhrd91

@fafhrd91 fafhrd91 changed the title ssl socket leak during handshake bpo-29743: ssl socket leak during handshake

Mar 9, 2017

@vstinner vstinner changed the title bpo-29743: ssl socket leak during handshake [asyncio] bpo-29743: ssl socket leak during handshake

Mar 9, 2017

@1st1

@1st1

1st1

1st1 approved these changes Jun 9, 2017

1st1 pushed a commit that referenced this pull request

Jun 9, 2017

1st1 pushed a commit that referenced this pull request

Jun 9, 2017

1st1 added a commit that referenced this pull request

Jun 9, 2017

1st1 added a commit that referenced this pull request

Jun 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).