3 Commits

Author SHA1 Message Date
Josh Bleecher Snyder 5cb91165ce all: gofmt with Go 1.19 2022-12-06 12:18:50 -08:00
Pawel Knap f822991fc0 readdcw: close handle during unwatch state
The Unwatch method on Windows is asynchronous. Thus when calling
Watch, Unwatch and Watch on the same path the Unwatch state may
happen after the second Watch call. This means that second Watch
will be skipped as already created.

This commit makes second Watch call invalidate Unwatch state. So
Watch->Unwatch->Watch will be basically a no-op. This doesn't
solve all the problems since the second Watch might have different
events to handle. However, this should be solved by using Rewatch
method.

Also, the code fixes a data race that may occur when invalidating
grip handle.

Fixes: #150
2018-05-01 21:03:15 +02:00
Simon Frei f419c004ac Use log package for timestamps and enable debugging via env var NOTIFY_DEBUG 2017-08-28 00:21:55 +02:00