Xiang Li 12 лет назад
Родитель
Сommit
793d5187a5
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      etcd.go

+ 1 - 2
etcd.go

@@ -625,10 +625,9 @@ func joinCluster(s *raft.Server, serverName string) error {
 			}
 			if resp.StatusCode == http.StatusTemporaryRedirect {
 				address := resp.Header.Get("Location")
-				debugf("Leader is %s", address)
 				debugf("Send Join Request to %s", address)
 				json.NewEncoder(&b).Encode(command)
-				resp, err = t.Post(fmt.Sprintf("%s/join", address), &b)
+				resp, err = t.Post(address, &b)
 			} else if resp.StatusCode == http.StatusBadRequest {
 				debug("Reach max number machines in the cluster")
 				return fmt.Errorf(errors[103])