Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
Signed-off-by: Max Smythe <smythe@google.com>
  • Loading branch information
maxsmythe committed Apr 26, 2023
1 parent 521c21f commit 0c8ba12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cache/informer_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ func (ic *informerCache) GetInformerNonBlocking(ctx context.Context, obj client.
}

// Use a canceled context to signal non-blocking
ctx, cancel := context.WithCancel(context.Background())
canceledCtx, cancel := context.WithCancel(context.Background())
cancel()

_, i, err := ic.Informers.Get(ctx, gvk, obj)
_, i, err := ic.Informers.Get(canceledCtx, gvk, obj)
if err != nil && !apierrors.IsTimeout(err) {
return nil, err
}
Expand Down

0 comments on commit 0c8ba12

Please sign in to comment.