fix bug health check not work
@@ -167,8 +167,11 @@ func pickOneEndpoint(c *model.ClusterConfig) *model.Endpoint {
}
if len(c.Endpoints) == 1 {
+ if !c.Endpoints[0].UnHealthy {
return c.Endpoints[0]
}
+ return nil
+ }
loadBalancer, ok := loadbalancer.LoadBalancerStrategy[c.LbStr]
if ok {
