瀏覽代碼

Merge pull request #4297 from ngaut/ngaut/raft-typo

raft: typo
Xiang Li 10 年之前
父節點
當前提交
6054748181
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      raft/raft.go

+ 1 - 1
raft/raft.go

@@ -857,7 +857,7 @@ func (r *raft) loadState(state pb.HardState) {
 	r.Vote = state.Vote
 }
 
-// isElectionTimeout returns true if r.elapsed is greater than the
+// isElectionTimeout returns true if r.electionElapsed is greater than the
 // randomized election timeout in (electiontimeout, 2 * electiontimeout - 1).
 // Otherwise, it returns false.
 func (r *raft) isElectionTimeout() bool {