浏览代码

raft: leader denies vote with the same term

Xiang Li 11 年之前
父节点
当前提交
828a8cf326
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      raft/raft.go

+ 2 - 0
raft/raft.go

@@ -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 {