Ver Fonte

raft: leader should tick heartbeat

Xiang Li há 12 anos atrás
pai
commit
8f4c615704
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      raft/raft.go

+ 1 - 1
raft/raft.go

@@ -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})