Skip to content

Commit

Permalink
Don't return error if WaitForCacheSync returns false
Browse files Browse the repository at this point in the history
... in resourceSyncer.Start. This means the stop channel was closed
and we shouldn't treat this as an error.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
  • Loading branch information
tpantelis authored and sridhargaddam committed Oct 23, 2023
1 parent 8a5bb5b commit d82a193
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/syncer/resource_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,7 @@ func (r *resourceSyncer) Start(stopCh <-chan struct{}) error {
if *r.config.WaitForCacheSync {
r.log.V(log.LIBDEBUG).Infof("Syncer %q waiting for informer cache to sync", r.config.Name)

if ok := cache.WaitForCacheSync(stopCh, r.informer.HasSynced); !ok {
return fmt.Errorf("failed to wait for informer cache to sync")
}
_ = cache.WaitForCacheSync(stopCh, r.informer.HasSynced)
}

r.workQueue.Run(stopCh, r.processNextWorkItem)
Expand Down

0 comments on commit d82a193

Please sign in to comment.