Skip to content

Commit

Permalink
Update etcd election to new API
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbelvin committed Dec 5, 2017
1 parent 0ceb321 commit 1713865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/etcd/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (eme *MasterElection) IsMaster(ctx context.Context) (bool, error) {
if err != nil {
return false, err
}
return leader == eme.instanceID, nil
return string(leader.Kvs[0].Value) == eme.instanceID, nil
}

// ResignAndRestart releases mastership, and re-joins the election.
Expand Down

0 comments on commit 1713865

Please sign in to comment.