Commit 8b50a243 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 2a8324f2
......@@ -341,10 +341,9 @@ class ConnectThread(threading.Thread):
wrap = ConnectWrapper(domain, addr, self.mgr, self.client)
wrap.connect_procedure()
if wrap.state == "notified":
for wrap in wrappers.keys():
wrap.close()
wrappers[wrap] = wrap
return wrappers
for w in wrappers.keys():
w.close()
return {wrap: wrap}
if wrap.state != "closed":
wrappers[wrap] = wrap
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