fix(#1804): do not refresh watched nodes that have been destroyed (deleted)

This commit is contained in:
Alexander Courtis
2022-12-19 14:36:42 +11:00
parent e0cfbbb93d
commit d949af7245
4 changed files with 11 additions and 0 deletions

View File

@@ -99,6 +99,8 @@ function Event:destroy(message)
end
Event._events[self._path] = nil
self.destroyed = true
end
function Watcher:new(path, files, callback, data)
@@ -139,6 +141,8 @@ function Watcher:destroy()
self._event:remove(self._listener)
utils.array_remove(Watcher._watchers, self)
self.destroyed = true
end
M.Watcher = Watcher