raft: use becomeFollower in cadidate state

This commit is contained in:
Xiang Li 2014-05-21 07:08:44 -07:00 committed by Yicheng Qin
parent 73e3394d2d
commit ab79550693

View File

@ -305,7 +305,7 @@ func (sm *stateMachine) Step(m Message) {
sm.lead = sm.addr
sm.sendAppend()
case len(sm.votes) - gr:
sm.state = stateFollower
sm.becomeFollower(sm.term, none)
}
}
case stateFollower: