mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Fix pluginwatcher panic on failed startup
This commit is contained in:
parent
f212b9db23
commit
3f5039a2d1
@ -187,7 +187,9 @@ func (w *Watcher) traversePluginDir(dir string) error {
|
|||||||
return fmt.Errorf("failed to watch %s, err: %v", path, err)
|
return fmt.Errorf("failed to watch %s, err: %v", path, err)
|
||||||
}
|
}
|
||||||
case mode&os.ModeSocket != 0:
|
case mode&os.ModeSocket != 0:
|
||||||
|
w.wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
|
defer w.wg.Done()
|
||||||
w.fsWatcher.Events <- fsnotify.Event{
|
w.fsWatcher.Events <- fsnotify.Event{
|
||||||
Name: path,
|
Name: path,
|
||||||
Op: fsnotify.Create,
|
Op: fsnotify.Create,
|
||||||
|
Loading…
Reference in New Issue
Block a user