Ver Fonte

etcd: fix serverHttp

Xiang Li há 11 anos atrás
pai
commit
5bfaaa7964
1 ficheiros alterados com 3 adições e 1 exclusões
  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)
 	}