mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-10 19:51:55 +00:00
Merge pull request #82446 from ibuildthecloud/master
Check cache is synced first before sleeping Kubernetes-commit: ae3b1099ee5d07b1cc4541bedec1ae63e52debf8
This commit is contained in:
commit
26b1e9b529
2
tools/cache/shared_informer.go
vendored
2
tools/cache/shared_informer.go
vendored
@ -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