diff --git a/raft.go b/raft.go index 85b066ec..6ab5ae98 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 + 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