mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
bpo-31234, socket.create_connection(): Fix ref cycle (#3546)
This commit is contained in:
parent
b157ce1e58
commit
acb9fa79fa
2 changed files with 4 additions and 0 deletions
|
@ -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 _:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue