[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/ClientStorage.py Improved the client-storage close method to try to avoid errors when
Jim Fulton
jim at zope.com
Fri Sep 5 13:56:50 EDT 2008
Log message for revision 90878:
Improved the client-storage close method to try to avoid errors when
invalidation messages are recived after the cache is closed.
Changed:
U ZODB/trunk/src/ZEO/ClientStorage.py
-=-
Modified: ZODB/trunk/src/ZEO/ClientStorage.py
===================================================================
--- ZODB/trunk/src/ZEO/ClientStorage.py 2008-09-05 17:56:47 UTC (rev 90877)
+++ ZODB/trunk/src/ZEO/ClientStorage.py 2008-09-05 17:56:50 UTC (rev 90878)
@@ -388,13 +388,18 @@
def close(self):
"""Storage API: finalize the storage, releasing external resources."""
+ if self._rpc_mgr is not None:
+ self._rpc_mgr.close()
+ self._rpc_mgr = None
+ if self._connection is not None:
+ self._connection.register_object(None) # Don't call me!
+ self._connection.close()
+ self._connection = None
+
self._tbuf.close()
if self._cache is not None:
self._cache.close()
self._cache = None
- if self._rpc_mgr is not None:
- self._rpc_mgr.close()
- self._rpc_mgr = None
def registerDB(self, db):
"""Storage API: register a database for invalidation messages.
More information about the Zodb-checkins
mailing list