[Zodb-checkins] CVS: StandaloneZODB/ZEO - ClientStorage.py:1.26.4.25

Jeremy Hylton jeremy@zope.com
Thu, 3 Jan 2002 19:15:19 -0500


Update of /cvs-repository/StandaloneZODB/ZEO
In directory cvs.zope.org:/tmp/cvs-serv22635

Modified Files:
      Tag: ZEO-ZRPC-Dev
	ClientStorage.py 
Log Message:
Raise a ClientDisconnected in tpc_begin() if necessary.

Remove an XXX comment that discusses a future design issue.


=== StandaloneZODB/ZEO/ClientStorage.py 1.26.4.24 => 1.26.4.25 ===
 
     def tpc_begin(self, transaction):
-        # XXX plan is to have begin be a local operation until the
-        # vote stage.
         self.tpc_cond.acquire()
         while self._transaction is not None:
             if self._transaction == transaction:
                 self.tpc_cond.release()
                 return
             self.tpc_cond.wait()
+
+        if self._server is None:
+            self.tpc_cond.release()
+            raise ClientDisconnected()
             
         self._ts = get_timestamp(self._ts)
         id = `self._ts`