Browse Source

http: add TODO for peers var

Yicheng Qin 11 years ago
parent
commit
d519491545
2 changed files with 4 additions and 2 deletions
  1. 3 1
      etcdserver/etcdhttp/http.go
  2. 1 1
      main.go

+ 3 - 1
etcdserver/etcdhttp/http.go

@@ -147,7 +147,9 @@ func httpPost(url string, data []byte) bool {
 type Handler struct {
 	Timeout time.Duration
 	Server  *etcdserver.Server
-	Peers   Peers
+	// TODO: dynamic configuration may make this outdated. take care of it.
+	// TODO: dynamic configuration may introduce race also.
+	Peers Peers
 }
 
 func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

+ 1 - 1
main.go

@@ -70,7 +70,7 @@ func main() {
 	h := &etcdhttp.Handler{
 		Timeout: *timeout,
 		Server:  s,
-		Peers:   peers,
+		Peers:   *peers,
 	}
 	http.Handle("/", h)
 	log.Fatal(http.ListenAndServe(*laddr, nil))