summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2017-09-13 22:54:34 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-09-13 22:54:34 (GMT)
commitd99e85b9f6422dd5e4f2eb1539368fc4003d4c8b (patch)
treeb589286c3f9a716bbc4946ed07b113bb9ce67c22 /Lib
parent769ddb075ac3a840d473930a12a5b72bfbab366f (diff)
downloadcpython-d99e85b9f6422dd5e4f2eb1539368fc4003d4c8b.zip
cpython-d99e85b9f6422dd5e4f2eb1539368fc4003d4c8b.tar.gz
cpython-d99e85b9f6422dd5e4f2eb1539368fc4003d4c8b.tar.bz2
[3.6] bpo-31234, socket.create_connection(): Fix ref cycle (GH-3546) (#3552)
(cherry picked from commit acb9fa79fa6453c2bbe3ccfc9cad2837feb90093)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/socket.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/socket.py b/Lib/socket.py
index 740e717..1ada24d 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -711,6 +711,8 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
if source_address:
sock.bind(source_address)
sock.connect(sa)
+ # Break explicitly a reference cycle
+ err = None
return sock
except error as _: