diff --git a/stdlib/FileWatching/src/FileWatching.jl b/stdlib/FileWatching/src/FileWatching.jl index 405f6219fc1cf..fd26b62132047 100644 --- a/stdlib/FileWatching/src/FileWatching.jl +++ b/stdlib/FileWatching/src/FileWatching.jl @@ -563,7 +563,7 @@ function wait(fdw::FDWatcher) events = GC.@preserve fdw _wait(fdw.watcher, fdw.mask) isopen(fdw) || throw(EOFError()) if !events.timedout - @lock fdw.notify fdw.events &= ~events.events + @lock fdw.watcher.notify fdw.watcher.events &= ~events.events return events end end