Skip to content

Commit

Permalink
fix name
Browse files Browse the repository at this point in the history
  • Loading branch information
1797818494 committed Feb 3, 2024
1 parent dce1422 commit 428b8fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ func (r *raft) Step(m pb.Message) error {
case m.Term > r.Term:
if m.Type == pb.MsgVote || m.Type == pb.MsgPreVote {
force := bytes.Equal(m.Context, []byte(campaignTransfer))
inLease := r.checkQuorum && r.lead != None && r.electionElapsed < r.electionTimeout && r.Lead != m.From
inLease := r.checkQuorum && r.lead != None && r.electionElapsed < r.electionTimeout && r.lead != m.From
if !force && inLease {
// If a server receives a RequestVote request within the minimum election timeout
// of hearing from a current leader, it does not update its term or grant its vote
Expand Down

0 comments on commit 428b8fa

Please sign in to comment.