[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.80

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

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

Modified Files:
Log Message:
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.

=== ZODB3/ZEO/ClientStorage.py 1.79 => 1.80 ===
--- ZODB3/ZEO/ClientStorage.py:1.79	Fri Dec 13 17:06:24 2002
+++ ZODB3/ZEO/ClientStorage.py	Fri Dec 20 11:11:58 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 = None