summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorMichaël Sghaïer <michael.sghaier@polyalgo.org>2017-06-09 22:29:46 (GMT)
committerYury Selivanov <yury@magic.io>2017-06-09 22:29:46 (GMT)
commitd1f575116ae5040ce36ca6097be2ab5dab8e4f53 (patch)
treecf856d34c4409d9df2b1e75eefb1e9907413244e /Lib/asyncio
parenta0e3d2dd09346b01e7d29a35ed31ed28041570b1 (diff)
downloadcpython-d1f575116ae5040ce36ca6097be2ab5dab8e4f53.zip
cpython-d1f575116ae5040ce36ca6097be2ab5dab8e4f53.tar.gz
cpython-d1f575116ae5040ce36ca6097be2ab5dab8e4f53.tar.bz2
Break circular references when closing SSLTransport objects (#981)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/sslproto.py10
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()