[Zodb-checkins] CVS: ZEO/ZEO/zrpc - client.py:1.1.2.14

Shane Hathaway shane@cvs.zope.org
Mon, 25 Mar 2002 16:54:30 -0500


Update of /cvs-repository/ZEO/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv7249

Modified Files:
      Tag: Standby-branch
	client.py 
Log Message:
Fixed race condition: if the storage server connected very quickly, the
one_attempt event never got set, which froze startup.


=== ZEO/ZEO/zrpc/client.py 1.1.2.13 => 1.1.2.14 ===
     def run(self):
         delay = self.tmin
-        while not (self.stopped or self.attempt_connects()):
+        while not self.stopped:
+            success = self.attempt_connects()
             if not self.one_attempt.isSet():
                 self.one_attempt.set()
+            if success:
+                break
             time.sleep(delay)
             delay *= 2
             if delay > self.tmax: