mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: reset votes when becomePreCandidate
This commit is contained in:
parent
2951faf770
commit
3740793b42
@ -611,6 +611,7 @@ func (r *raft) becomePreCandidate() {
|
||||
// but doesn't change anything else. In particular it does not increase
|
||||
// r.Term or change r.Vote.
|
||||
r.step = stepCandidate
|
||||
r.votes = make(map[uint64]bool)
|
||||
r.tick = r.tickElection
|
||||
r.state = StatePreCandidate
|
||||
r.logger.Infof("%x became pre-candidate at term %d", r.id, r.Term)
|
||||
|
Loading…
x
Reference in New Issue
Block a user