From 828a8cf326fdda94abb700fc6381036118ff3488 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Sat, 24 May 2014 21:17:29 -0700 Subject: [PATCH] raft: leader denies vote with the same term --- raft/raft.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/raft/raft.go b/raft/raft.go index 4c55b2bc8..9ccf33cf0 100644 --- a/raft/raft.go +++ b/raft/raft.go @@ -282,6 +282,8 @@ func (sm *stateMachine) Step(m Message) { sm.sendAppend() } } + case msgVote: + sm.send(Message{To: m.From, Type: msgVoteResp, Index: -1}) } case stateCandidate: switch m.Type {