mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
fix watch func
This commit is contained in:
parent
fa32988c6f
commit
618427fe84
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user