Commit 7597373d authored by Guido van Rossum's avatar Guido van Rossum

Add a log msg "closing troubled socket <address>" when we receive an

'x' event for a wrapper and then close it.
parent ba7fae18
...@@ -323,7 +323,7 @@ class ConnectThread(threading.Thread): ...@@ -323,7 +323,7 @@ class ConnectThread(threading.Thread):
return 0 return 0
# Select connecting wrappers # Select connecting wrappers
connecting = [wrap connecting = [wrap
for wrap in wrappers.keys() for wrap in wrappers.keys()
if wrap.state == "connecting"] if wrap.state == "connecting"]
if not connecting: if not connecting:
break break
...@@ -335,6 +335,7 @@ class ConnectThread(threading.Thread): ...@@ -335,6 +335,7 @@ class ConnectThread(threading.Thread):
continue continue
# Exceptable wrappers are in trouble; close these suckers # Exceptable wrappers are in trouble; close these suckers
for wrap in x: for wrap in x:
log("CT: closing troubled socket %s" % str(wrap.addr))
del wrappers[wrap] del wrappers[wrap]
wrap.close() wrap.close()
# Writable sockets are connected # Writable sockets are connected
......
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