Merge pull request #82446 from ibuildthecloud/master

Check cache is synced first before sleeping

Kubernetes-commit: ae3b1099ee5d07b1cc4541bedec1ae63e52debf8
This commit is contained in:
Kubernetes Publisher 2019-09-11 18:28:59 -07:00
commit 26b1e9b529

View File

@ -209,7 +209,7 @@ func WaitForNamedCacheSync(controllerName string, stopCh <-chan struct{}, cacheS
// if the controller should shutdown
// callers should prefer WaitForNamedCacheSync()
func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool {
err := wait.PollUntil(syncedPollPeriod,
err := wait.PollImmediateUntil(syncedPollPeriod,
func() (bool, error) {
for _, syncFunc := range cacheSyncs {
if !syncFunc() {