Browse Source

etcd: fix serverHttp

Xiang Li 11 years ago
parent
commit
5bfaaa7964
1 changed files with 3 additions and 1 deletions
  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)
 	}