Skip to content

Commit 4ee336e

Browse files
Matt Rogerssimo5
Matt Rogers
authored andcommitted
Fix fsnotify deadlock on linux
The watcher.Remove() call added per 020a35e as a fix for Windows behavior causes a deadlock on linux during a file rename and replace. Remove this call since we do not care about running on Windows.
1 parent aa031d6 commit 4ee336e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

watcher.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ func WatchForUpdates(filename string, done <-chan bool, action func()) {
5151
// can't be opened.
5252
if event.Op&(fsnotify.Remove|fsnotify.Rename|fsnotify.Chmod) != 0 {
5353
log.Printf("watching interrupted on event: %s", event)
54-
watcher.Remove(filename)
5554
WaitForReplacement(filename, event.Op, watcher)
5655
}
5756
log.Printf("reloading after event: %s", event)

0 commit comments

Comments
 (0)