moby--moby/pkg/filenotify
Kir Kolyshkin fffa8958d0 pkg/filenotify/poller: fix Close()
The code in Close() that removes the watches was not working,
because it first sets `w.closed = true` and then calls w.close(),
which starts with
```
        if w.closed {
                return errPollerClosed
	}
```

Fix by setting w.closed only after calling w.remove() for all the
files being watched.

While at it, remove the duplicated `delete(w.watches, name)` code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-08-29 22:16:04 -07:00
..
filenotify.go Add canonical import comment 2018-02-05 16:51:57 -05:00
fsnotify.go Add canonical import comment 2018-02-05 16:51:57 -05:00
poller.go pkg/filenotify/poller: fix Close() 2018-08-29 22:16:04 -07:00
poller_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00