mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Merge pull request #128340 from googs1025/automated-cherry-pick-of-#127834-upstream-release-1.31
Automated cherry pick of #127834: fix(leaderelection): nil check in OnStoppedLeading func
This commit is contained in:
commit
11d2b4d7ed
@ -50,7 +50,9 @@ func RunWithLeaderElection(ctx context.Context, config *rest.Config, newRunnerFn
|
|||||||
run(ctx, 1)
|
run(ctx, 1)
|
||||||
},
|
},
|
||||||
OnStoppedLeading: func() {
|
OnStoppedLeading: func() {
|
||||||
cancel()
|
if cancel != nil {
|
||||||
|
cancel()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user