diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-09-13 17:10:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-13 17:10:10 (GMT) |
commit | acb9fa79fa6453c2bbe3ccfc9cad2837feb90093 (patch) | |
tree | bb07e26f46db0c0ab90d9de7fafb04d4ce827b17 /Lib/socket.py | |
parent | b157ce1e58b03988ce4340a55d0b856125833cc5 (diff) | |
download | cpython-acb9fa79fa6453c2bbe3ccfc9cad2837feb90093.zip cpython-acb9fa79fa6453c2bbe3ccfc9cad2837feb90093.tar.gz cpython-acb9fa79fa6453c2bbe3ccfc9cad2837feb90093.tar.bz2 |
bpo-31234, socket.create_connection(): Fix ref cycle (#3546)
Diffstat (limited to 'Lib/socket.py')
-rw-r--r-- | Lib/socket.py | 2 |
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 _: |