[Zodb-checkins] CVS: Zope3/lib/python/ZEO - ClientStorage.py:1.49

Guido van Rossum guido@python.org
Fri, 20 Dec 2002 11:15:30 -0500


Update of /cvs-repository/Zope3/lib/python/ZEO
In directory cvs.zope.org:/tmp/cvs-serv18081

Modified Files:
	ClientStorage.py 
Log Message:
(Backport of 1.80 from ZODB3)

We saw a weird crash of a test run once in _update_cache() where
self._tbuf was unexpectedly None.  The only way this can happen is
when the storage is closed (probably by a different thread); close()
sets _tbuf to None.  It turns out that a TransactionBuffer instance
can safely be closed more than once, so there's no need to set _tbuf
to None in the close() method.


=== Zope3/lib/python/ZEO/ClientStorage.py 1.48 => 1.49 ===
--- Zope3/lib/python/ZEO/ClientStorage.py:1.48	Thu Dec 19 16:39:40 2002
+++ Zope3/lib/python/ZEO/ClientStorage.py	Fri Dec 20 11:15:30 2002
@@ -266,9 +266,7 @@
 
     def close(self):
         """Storage API: finalize the storage, releasing external resources."""
-        if self._tbuf is not None:
-            self._tbuf.close()
-            self._tbuf = None
+        self._tbuf.close()
         if self._cache is not None:
             self._cache.close()
             self._cache = None