[Zodb-checkins] SVN: ZODB/branches/3.8/src/ZEO/ClientStorage.py Improved the client-storage close method to try to avoid errors when

Jim Fulton jim at zope.com
Mon Jul 14 13:23:41 EDT 2008


Log message for revision 88362:
  Improved the client-storage close method to try to avoid errors when
  invalidation messages are recived after the cache is closed.
  

Changed:
  U   ZODB/branches/3.8/src/ZEO/ClientStorage.py

-=-
Modified: ZODB/branches/3.8/src/ZEO/ClientStorage.py
===================================================================
--- ZODB/branches/3.8/src/ZEO/ClientStorage.py	2008-07-14 17:20:30 UTC (rev 88361)
+++ ZODB/branches/3.8/src/ZEO/ClientStorage.py	2008-07-14 17:23:41 UTC (rev 88362)
@@ -378,13 +378,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