Commit c08dd17f authored by Jim Fulton's avatar Jim Fulton

Improved the client-storage close method to try to avoid errors when

invalidation messages are recived after the cache is closed.
parent 2cdeebd8
...@@ -378,13 +378,18 @@ class ClientStorage(object): ...@@ -378,13 +378,18 @@ class ClientStorage(object):
def close(self): def close(self):
"""Storage API: finalize the storage, releasing external resources.""" """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() self._tbuf.close()
if self._cache is not None: if self._cache is not None:
self._cache.close() self._cache.close()
self._cache = None self._cache = None
if self._rpc_mgr is not None:
self._rpc_mgr.close()
self._rpc_mgr = None
def registerDB(self, db): def registerDB(self, db):
"""Storage API: register a database for invalidation messages. """Storage API: register a database for invalidation messages.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment