Fix leader id initialization.

pull/1971/head
Ben Johnson 2015-03-16 11:26:24 -06:00
parent 369ead2cc9
commit 75450466a6
2 changed files with 1 additions and 2 deletions

View File

@ -185,8 +185,6 @@ func (h *Handler) servePing(w http.ResponseWriter, r *http.Request) {
log.Printf("unable to write client config: %s", err)
return
}
w.WriteHeader(http.StatusOK)
}
// error writes an error to the client and sets the status code.

View File

@ -513,6 +513,7 @@ func (l *Log) Initialize() error {
l.term = term
l.votedFor = 0
l.lastLogTerm = term
l.leaderID = l.id
// Begin state loop as leader.
l.startStateLoop(l.closing, Leader)