From 428b8fab1a728fb25ea578e4aad9a3db6be5fda4 Mon Sep 17 00:00:00 2001 From: 1797818494 <1797818494@qq.com> Date: Sat, 3 Feb 2024 13:44:28 +0800 Subject: [PATCH] fix name --- raft.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raft.go b/raft.go index 6ab5ae98..418eae94 100644 --- a/raft.go +++ b/raft.go @@ -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