From 618427fe84c238857c1c89976bdc2a8089c5d2c5 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 9 May 2019 23:06:15 +0800 Subject: [PATCH] fix watch func --- pkg/conf/paladin/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/conf/paladin/file.go b/pkg/conf/paladin/file.go index 10d152419..0995cf227 100644 --- a/pkg/conf/paladin/file.go +++ b/pkg/conf/paladin/file.go @@ -74,7 +74,7 @@ func NewFile(base string) (Client, error) { notify: notify, watchers: make(map[*watcher]struct{}), } - go f.watch(base) + go f.watchproc(base) return f, nil } @@ -111,7 +111,7 @@ func (f *file) Close() error { } // file config daemon to watch file modification -func (f *file) watch(base string) { +func (f *file) watchproc(base string) { if err := f.notify.Add(base); err != nil { log.Printf("paladin: create fsnotify for base path %s fail %s, reload function will lose efficacy", base, err) return