Skip to content

Commit

Permalink
Nacos endpoint load first and ignore address (#2692)
Browse files Browse the repository at this point in the history
* Nacos endpoint load first and ignore address

* Nacos endpoint load first and ignore address
  • Loading branch information
AlbumenJ authored Jul 1, 2024
1 parent e755697 commit 33d76a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion remoting/nacos/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func GetNacosConfig(url *common.URL) ([]nacosConstant.ServerConfig, nacosConstan
}

var serverConfigs []nacosConstant.ServerConfig
if len(url.Location) != 0 {
// if the endpoint is set, the location will be ignored
if len(url.GetParam(constant.NacosEndpoint, "")) == 0 {
addresses := strings.Split(url.Location, ",")
serverConfigs = make([]nacosConstant.ServerConfig, 0, len(addresses))
for _, addr := range addresses {
Expand Down

0 comments on commit 33d76a1

Please sign in to comment.