Skip to content

Commit 97640bb

Browse files
authored
Windows: add missing defer to Watcher.WatchList (#447)
1 parent b52bbe8 commit 97640bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func (w *Watcher) Remove(name string) error {
100100
// WatchList returns the directories and files that are being monitered.
101101
func (w *Watcher) WatchList() []string {
102102
w.mu.Lock()
103-
w.mu.Unlock()
103+
defer w.mu.Unlock()
104104

105105
entries := make([]string, 0, len(w.watches))
106106
for _, entry := range w.watches {

0 commit comments

Comments
 (0)