Skip to content

Commit ff335e3

Browse files
committed
re-using context
1 parent f9b84fa commit ff335e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

leaderelection/leader_election.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func RunWithLeaderElection(
229229
logger := klog.FromContext(ctx)
230230

231231
if !opts.LeaderElection {
232-
run(klog.NewContext(context.Background(), logger))
232+
run(ctx)
233233
} else {
234234
// Create a new clientset for leader election. When the attacher
235235
// gets busy and its client gets throttled, the leader election

0 commit comments

Comments
 (0)