[Zodb-checkins] CVS: ZEO/ZEO/zrpc - client.py:1.1.2.6
Jeremy Hylton
jeremy@zope.com
Sat, 26 Jan 2002 13:25:52 -0500
Update of /cvs-repository/ZEO/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv1691
Modified Files:
Tag: Standby-branch
client.py
Log Message:
In connect() method, treat EISCONN as success.
Also rename ConnectThread's attr "addr" to "addrs", because it is a
sequence.
=== ZEO/ZEO/zrpc/client.py 1.1.2.5 => 1.1.2.6 ===
# than close() and those defined by the Thread API.
- def __init__(self, mgr, client, addr, tmin, tmax):
- self.__super_init(name="Connect(%s)" % addr)
+ def __init__(self, mgr, client, addrs, tmin, tmax):
+ self.__super_init(name="Connect(%s)" % addrs)
self.mgr = mgr
self.client = client
- self.addr = addr
+ self.addrs = addrs
self.tmin = tmin
self.tmax = tmax
self.stopped = 0
@@ -203,9 +203,9 @@
"Return true if any connect attempt succeeds."
self.sockets = {}
- log("attempting connection on %d sockets" % len(self.addr))
+ log("attempting connection on %d sockets" % len(self.addrs))
try:
- for domain, addr in self.addr:
+ for domain, addr in self.addrs:
if __debug__:
log("attempt connection to %s" % repr(addr),
level=zLOG.DEBUG)
@@ -256,7 +256,7 @@
e = s.connect_ex(addr)
if e == errno.EINPROGRESS:
return 1
- elif e == 0:
+ elif e == 0 or e == errno.EISCONN:
c = self.test_connection(s, addr)
log("connected to %s" % repr(addr), level=zLOG.DEBUG)
if c: