raft: leader should tick heartbeat

This commit is contained in:
Xiang Li 2014-09-03 22:00:31 -07:00
parent efe2141c16
commit 8f4c615704

View File

@ -302,7 +302,7 @@ func (r *raft) becomeLeader() {
}
r.step = stepLeader
r.reset(r.Term)
r.tick = r.tickElection
r.tick = r.tickHeartbeat
r.lead = r.id
r.state = stateLeader
r.appendEntry(pb.Entry{Data: nil})