Merge pull request #29694 from lixiaobing10051267/masterFileNodify2
It is errNoSuchWatch not errNoSuchPoller in filenotify/poller.go
This commit is contained in:
commit
e3f61bd254
2 changed files with 3 additions and 3 deletions
|
@ -15,8 +15,8 @@ import (
|
|||
var (
|
||||
// errPollerClosed is returned when the poller is closed
|
||||
errPollerClosed = errors.New("poller is closed")
|
||||
// errNoSuchPoller is returned when trying to remove a watch that doesn't exist
|
||||
errNoSuchWatch = errors.New("poller does not exist")
|
||||
// errNoSuchWatch is returned when trying to remove a watch that doesn't exist
|
||||
errNoSuchWatch = errors.New("watch does not exist")
|
||||
)
|
||||
|
||||
// watchWaitTime is the time to wait between file poll loops
|
||||
|
|
|
@ -108,7 +108,7 @@ func assertEvent(w FileWatcher, eType fsnotify.Op) error {
|
|||
select {
|
||||
case e := <-w.Events():
|
||||
if e.Op != eType {
|
||||
err = fmt.Errorf("got wrong event type, expected %q: %v", eType, e)
|
||||
err = fmt.Errorf("got wrong event type, expected %q: %v", eType, e.Op)
|
||||
}
|
||||
case e := <-w.Errors():
|
||||
err = fmt.Errorf("got unexpected error waiting for events %v: %v", eType, e)
|
||||
|
|
Loading…
Reference in a new issue