fix(dispatch) should call e.Index()

release-0.4
Xiang Li 2013-12-12 09:56:28 -08:00
parent a5bca025b1
commit 36dda352d9
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ func (s *Server) Dispatch(c raft.Command, w http.ResponseWriter, req *http.Reque
w.Header().Set("Content-Type", "application/json")
// etcd index should be the same as the event index
// which is also the last modified index of the node
w.Header().Add("X-Etcd-Index", fmt.Sprint(e.Index))
w.Header().Add("X-Etcd-Index", fmt.Sprint(e.Index()))
w.Header().Add("X-Raft-Index", fmt.Sprint(s.CommitIndex()))
w.Header().Add("X-Raft-Term", fmt.Sprint(s.Term()))