Browse Source

raft: leader denies vote with the same term

Xiang Li 11 years ago
parent
commit
828a8cf326
1 changed files with 2 additions and 0 deletions
  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 {