Remove session listener when stopping tree cache
To better clean up the tree cache when stopping, remove the session listener callback. This helps avoid extra object references that could keep the python objects from being garbage collected longer than necessary. Change-Id: I123624b531ca34b10394a23397dcfe932c3fa7e7
This commit is contained in:
@@ -138,6 +138,7 @@ class ZuulTreeCache(abc.ABC):
|
||||
self._stopped = True
|
||||
self._event_queue.put(None)
|
||||
self._playback_queue.put(None)
|
||||
self.client.remove_listener(self._sessionListener)
|
||||
|
||||
def _walkTree(self, root=None, seen_paths=None):
|
||||
# Recursively walk the tree and emit fake changed events for
|
||||
|
||||
Reference in New Issue
Block a user