raft: leader denies vote with the same term

release-2.0
Xiang Li 2014-05-24 21:17:29 -07:00 committed by Yicheng Qin
parent 93b08502e4
commit 828a8cf326
1 changed files with 2 additions and 0 deletions

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 {