[Zodb-checkins] CVS: StandaloneZODB/ZEO/zrpc - client.py:1.1.2.2.2.3
Jeremy Hylton
jeremy@zope.com
Fri, 9 Aug 2002 16:07:30 -0400
Update of /cvs-repository/StandaloneZODB/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv10589/ZEO/zrpc
Modified Files:
Tag: ZEO2-branch
client.py
Log Message:
Log symbolic constants with connect_ex() (and log at DEBUG level).
XXX Add timeout to join() call in thread cleanup.
=== StandaloneZODB/ZEO/zrpc/client.py 1.1.2.2.2.2 => 1.1.2.2.2.3 ===
--- StandaloneZODB/ZEO/zrpc/client.py:1.1.2.2.2.2 Thu May 30 23:19:16 2002
+++ StandaloneZODB/ZEO/zrpc/client.py Fri Aug 9 16:07:29 2002
@@ -87,7 +87,9 @@
if self._thread is not None:
# XXX race on _thread
self._thread.stop()
- self._thread.join()
+ self._thread.join(10)
+ if self._thread.isAlive():
+ print "Warning! Thread still alive"
finally:
self._connect_lock.release()
if self.connection:
@@ -314,7 +316,8 @@
log("failed to connect to %s: %s" % (addr, msg),
level=zLOG.ERROR)
else:
- log("connect_ex(%s) == %s" % (addr, e))
+ log("connect_ex(%s) == %s" % (addr, errno.errorcode.get(e, e)),
+ level=zLOG.DEBUG)
if e in _CONNECT_IN_PROGRESS:
return
elif e in _CONNECT_OK: