summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2014-08-31 01:58:47 -0700
committerJoshua Harlow <harlowja@gmail.com>2014-08-31 01:58:47 -0700
commit71dd75c3da5e5b8a61f0aef293e38185d3dcb393 (patch)
treea831da1e0f70a9117481623c7d6542122e7b5ad8
parent4e2ae9c7e879094a61f6bb26281804ec857944ad (diff)
downloadzake-71dd75c3da5e5b8a61f0aef293e38185d3dcb393.tar.gz
Clear the watches in the stop method
-rw-r--r--zake/fake_client.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/zake/fake_client.py b/zake/fake_client.py
index f4dc75c..3cca788 100644
--- a/zake/fake_client.py
+++ b/zake/fake_client.py
@@ -388,6 +388,9 @@ class FakeClient(object):
with self._open_close_lock:
if self._connected:
self._connected = False
+ with self._watches_lock:
+ self._child_watches.clear()
+ self._data_watches.clear()
self.storage.purge(self)
self._fire_state_change(k_states.KazooState.LOST)
if self._own_handler and close_handler: