Commit 4e36c877 authored by Guido van Rossum's avatar Guido van Rossum

Fix a bug in _create_wrappers() according to a suggestion by Barry

Pederson.  The 'wrap' local variable was reused in a way that
overwrote the value intended to set the return dictionary.
parent 6eead409
...@@ -341,10 +341,9 @@ class ConnectThread(threading.Thread): ...@@ -341,10 +341,9 @@ class ConnectThread(threading.Thread):
wrap = ConnectWrapper(domain, addr, self.mgr, self.client) wrap = ConnectWrapper(domain, addr, self.mgr, self.client)
wrap.connect_procedure() wrap.connect_procedure()
if wrap.state == "notified": if wrap.state == "notified":
for wrap in wrappers.keys(): for w in wrappers.keys():
wrap.close() w.close()
wrappers[wrap] = wrap return {wrap: wrap}
return wrappers
if wrap.state != "closed": if wrap.state != "closed":
wrappers[wrap] = wrap wrappers[wrap] = wrap
return wrappers return wrappers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment