From cb0e4f8228abbbd499d64e40f0dfe41cb2bb040a Mon Sep 17 00:00:00 2001 From: Amim Knabben Date: Tue, 16 Aug 2022 17:29:00 -0300 Subject: [PATCH] Using error from cacheCtx.Err() for wait cache return --- controllers/remote/cluster_cache_tracker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/remote/cluster_cache_tracker.go b/controllers/remote/cluster_cache_tracker.go index 51e75cada756..0b0dcab293eb 100644 --- a/controllers/remote/cluster_cache_tracker.go +++ b/controllers/remote/cluster_cache_tracker.go @@ -265,7 +265,7 @@ func (t *ClusterCacheTracker) newClusterAccessor(ctx context.Context, cluster cl // Start the cache!!! go cache.Start(cacheCtx) //nolint:errcheck if !cache.WaitForCacheSync(cacheCtx) { - return nil, fmt.Errorf("failed waiting for cache for remote cluster %v to sync: %w", cluster, err) + return nil, fmt.Errorf("failed waiting for cache for remote cluster %v to sync: %w", cluster, cacheCtx.Err()) } // Start cluster healthcheck!!!