summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-06-09 23:14:24 (GMT)
committerGitHub <noreply@github.com>2017-06-09 23:14:24 (GMT)
commit7f1cd726c6e2d20368fe4d6a9762556c6d3604c2 (patch)
tree5b08ec1520878d2c155b6f4631225a3c334fc93b /Lib/asyncio
parentff9511bbadba27457cd0eb084e9b4305ab9dfcf5 (diff)
downloadcpython-7f1cd726c6e2d20368fe4d6a9762556c6d3604c2.zip
cpython-7f1cd726c6e2d20368fe4d6a9762556c6d3604c2.tar.gz
cpython-7f1cd726c6e2d20368fe4d6a9762556c6d3604c2.tar.bz2
Break circular references when closing SSLTransport objects (#981) (#2048)
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 31803ac..61d478e 100644
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -685,12 +685,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()