diff options
author | Michaël Sghaïer <michael.sghaier@polyalgo.org> | 2017-06-09 22:29:46 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2017-06-09 22:29:46 (GMT) |
commit | d1f575116ae5040ce36ca6097be2ab5dab8e4f53 (patch) | |
tree | cf856d34c4409d9df2b1e75eefb1e9907413244e /Lib/asyncio/sslproto.py | |
parent | a0e3d2dd09346b01e7d29a35ed31ed28041570b1 (diff) | |
download | cpython-d1f575116ae5040ce36ca6097be2ab5dab8e4f53.zip cpython-d1f575116ae5040ce36ca6097be2ab5dab8e4f53.tar.gz cpython-d1f575116ae5040ce36ca6097be2ab5dab8e4f53.tar.bz2 |
Break circular references when closing SSLTransport objects (#981)
Diffstat (limited to 'Lib/asyncio/sslproto.py')
-rw-r--r-- | Lib/asyncio/sslproto.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index a7f1e61..68499e5 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -681,12 +681,14 @@ class SSLProtocol(protocols.Protocol): 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() |