diff options
author | Ben Bangert <ben@groovie.org> | 2017-05-31 13:36:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-31 13:36:23 -0700 |
commit | 6cab0f04c7e397c9070cb9a33e918c86860c2bf1 (patch) | |
tree | 24d0606f3b8349d59320ee33cfe6bef9b7310ae0 | |
parent | faad725c2e148b74147ecba63b75b9be101efdea (diff) | |
parent | 20f285b18b04b5c213f3c5ad091be5227e44678b (diff) | |
download | kazoo-6cab0f04c7e397c9070cb9a33e918c86860c2bf1.tar.gz |
Merge pull request #354 from d3matt/FIX/potential_leak
Fix potential leak in DataWatch and ChildrenWatch
-rw-r--r-- | kazoo/recipe/watchers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kazoo/recipe/watchers.py b/kazoo/recipe/watchers.py index 8b7852e..7294eca 100644 --- a/kazoo/recipe/watchers.py +++ b/kazoo/recipe/watchers.py @@ -163,6 +163,7 @@ class DataWatch(object): result = self._func(data, stat) if result is False: self._stopped = True + self._func = None self._client.remove_listener(self._session_watcher) except Exception as exc: log.exception(exc) @@ -338,6 +339,7 @@ class ChildrenWatch(object): result = self._func(children) if result is False: self._stopped = True + self._func = None except Exception as exc: log.exception(exc) raise |