Skip to content

Commit

Permalink
set leader flag when get leader (#1939)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Sep 28, 2022
1 parent af6973f commit 38956b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func (c *Controller) leaderElection() {
var flag bool
for {
if c.isLeader() {
config.WasLeader = true
return
}
if !flag {
Expand Down

0 comments on commit 38956b6

Please sign in to comment.