diff --git a/windows.go b/windows.go index ddc69ef8..02ce7deb 100644 --- a/windows.go +++ b/windows.go @@ -100,7 +100,7 @@ func (w *Watcher) Remove(name string) error { // WatchList returns the directories and files that are being monitered. func (w *Watcher) WatchList() []string { w.mu.Lock() - w.mu.Unlock() + defer w.mu.Unlock() entries := make([]string, 0, len(w.watches)) for _, entry := range w.watches {