Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.6] bpo-29870: Break circular references when closing SSLTransport objects (#981) #2049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Lib/asyncio/sslproto.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,12 +686,14 @@ def _fatal_error(self, exc, message='Fatal error on transport'):
self._transport._force_close(exc)

def _finalize(self):
self._sslpipe = None

if self._transport is not None:
self._transport.close()

def _abort(self):
if self._transport is not None:
try:
try:
if self._transport is not None:
self._transport.abort()
finally:
self._finalize()
finally:
self._finalize()
3 changes: 3 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ Core and Builtins
Library
-------

- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl
implementation. Patch by Michaël Sghaïer.

- bpo-29743: Closing transport during handshake process leaks open socket.
Patch by Nikolay Kim

Expand Down