Merge pull request #354 from d3matt/FIX/potential_leak
Fix potential leak in DataWatch and ChildrenWatch
This commit is contained in:
commit
6cab0f04c7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue