ClusterApi.go
@@ -44,8 +44,7 @@ if resultMsg == "运行失败" { return false } b := VerifyNodeServer(ip, port) return b return true } //关闭服务 @@ -100,7 +99,7 @@ } //验证节点服务是否正常启动 func VerifyNodeServer(ip string, port string) bool { func VerifyNodeServer(ip string, port string, waitTime int) bool { b := false url := "http://" + ip + ":" + port for i := 1; i < 3; i++ { @@ -108,7 +107,7 @@ if err != nil { b = false if i < 3 { time.Sleep(time.Second * 10) time.Sleep(time.Second * time.Duration(waitTime)) continue } } else {