From 77a5c1377c5171d1805a77b8f76da5b805621b1e 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 5a182fc84f80..fe6dfe4f20a7 100644 --- a/controllers/remote/cluster_cache_tracker.go +++ b/controllers/remote/cluster_cache_tracker.go @@ -266,7 +266,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!!!