Skip to content

Commit

Permalink
set leader flag when get leader
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Sep 27, 2022
1 parent 5ef11cb commit 4a80a48
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 4a80a48

Please sign in to comment.