raft: leader denies vote with the same term

This commit is contained in:
Xiang Li 2014-05-24 21:17:29 -07:00 committed by Yicheng Qin
parent 93b08502e4
commit 828a8cf326

View File

@ -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 {