mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #82446 from ibuildthecloud/master
Check cache is synced first before sleeping
This commit is contained in:
commit
ae3b1099ee
@ -209,7 +209,7 @@ func WaitForNamedCacheSync(controllerName string, stopCh <-chan struct{}, cacheS
|
|||||||
// if the controller should shutdown
|
// if the controller should shutdown
|
||||||
// callers should prefer WaitForNamedCacheSync()
|
// callers should prefer WaitForNamedCacheSync()
|
||||||
func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool {
|
func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool {
|
||||||
err := wait.PollUntil(syncedPollPeriod,
|
err := wait.PollImmediateUntil(syncedPollPeriod,
|
||||||
func() (bool, error) {
|
func() (bool, error) {
|
||||||
for _, syncFunc := range cacheSyncs {
|
for _, syncFunc := range cacheSyncs {
|
||||||
if !syncFunc() {
|
if !syncFunc() {
|
||||||
|
Loading…
Reference in New Issue
Block a user