瀏覽代碼

etcd: fix serverHttp

Xiang Li 11 年之前
父節點
當前提交
5bfaaa7964
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      etcd/etcd.go

+ 3 - 1
etcd/etcd.go

@@ -103,8 +103,10 @@ func (s *Server) Stop() {
 
 func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 	switch s.mode.Get() {
-	case participantMode, standbyMode:
+	case participantMode:
 		s.p.ServeHTTP(w, r)
+	case standbyMode:
+		s.s.ServeHTTP(w, r)
 	default:
 		http.NotFound(w, r)
 	}