mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Closing stopCh when pod_store is not created
If there is an error and pod store is not created, reflector should be stopped.
This commit is contained in:
parent
f978c4cab5
commit
1e7a4d1cd5
@ -61,6 +61,7 @@ func NewPodStore(c clientset.Interface, namespace string, label labels.Selector,
|
||||
}
|
||||
return false, nil
|
||||
}); err != nil {
|
||||
close(stopCh)
|
||||
return nil, err
|
||||
}
|
||||
return &PodStore{Store: store, stopCh: stopCh, Reflector: reflector}, nil
|
||||
|
Loading…
Reference in New Issue
Block a user