From ba032e1444ac7314910cf61ca3b1f0dde3baed7d Mon Sep 17 00:00:00 2001 From: Nathan Youngman Date: Fri, 4 Jul 2014 20:15:51 -0600 Subject: [PATCH] kqueue: fix incorrect mutex used in Close() identified at https://code.google.com/p/go/issues/detail?id=8282#c5 --- fsnotify_bsd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsnotify_bsd.go b/fsnotify_bsd.go index dcb14da..33da394 100644 --- a/fsnotify_bsd.go +++ b/fsnotify_bsd.go @@ -101,9 +101,9 @@ func (w *Watcher) Close() error { // Send "quit" message to the reader goroutine w.done <- true - w.pmut.Lock() + w.wmut.Lock() ws := w.watches - w.pmut.Unlock() + w.wmut.Unlock() for name := range ws { w.Remove(name) } -- 2.50.1