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

Jeremy Hylton jeremy@zope.com
Fri, 7 Sep 2001 15:37:55 -0400


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

Modified Files:
	ClientStorage.py 
Log Message:
Merge in zeo-1_0-branch

Don't release the commit lock unless there is a transaction in
progress.  This appears to cause the "release unlocked lock" error to
be replaced with a socket.error: "bad file descriptor".  That's
progress?




=== StandaloneZODB/ZEO/ClientStorage.py 1.33 => 1.34 ===
         self._transaction=None
         thread.start_new_thread(self._call.connect,(0,))
-        try: self._commit_lock_release()
-        except: pass
+        if self._transaction is not None:
+            try:
+                self._commit_lock_release()
+            except:
+                pass
 
     def becomeAsync(self, map):
         self._lock_acquire()
@@ -479,6 +482,7 @@
                             "This action is temporarily unavailable.<p>")
                     r=self._call(self.__begin, id, user, desc, ext)
                 except:
+                    # XXX can't seem to guarantee that the lock is held here. 
                     self._commit_lock_release()
                     raise