[Zodb-checkins] CVS: ZODB3/ZEO - StorageServer.py:1.92

Guido van Rossum guido@python.org
Mon, 20 Jan 2003 16:26:34 -0500


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv1933

Modified Files:
	StorageServer.py 
Log Message:
Subtle change to run() loop: when a deadlock is detected, set
_deadline to None, to prevent reporting the same timeout more than
once.  Added a helpful comment too. :-)


=== ZODB3/ZEO/StorageServer.py 1.91 => 1.92 ===
--- ZODB3/ZEO/StorageServer.py:1.91	Mon Jan 20 15:15:44 2003
+++ ZODB3/ZEO/StorageServer.py	Mon Jan 20 16:26:31 2003
@@ -824,9 +824,12 @@
         while 1:
             self._cond.acquire()
             try:
-                while self._client is None:
+                while self._deadline is None:
                     self._cond.wait()
                 howlong = self._deadline - time.time()
+                if howlong <= 0:
+                    # Prevent reporting timeout more than once
+                    self._deadline = None
                 client = self._client # For the howlong <= 0 branch below
             finally:
                 self._cond.release()