Skip to content

Commit

Permalink
Merge branch 'alibaba:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
DarrenLuo authored Jun 14, 2023
2 parents bd95ec1 + 4de440d commit 1f87b93
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ public ServerListManager(Properties properties) {
public ServerListManager(NacosClientProperties properties, String namespace) {
this.namespace = namespace;
initServerAddr(properties);
if (!serverList.isEmpty()) {
currentIndex.set(new Random().nextInt(serverList.size()));
}
if (serverList.isEmpty() && StringUtils.isEmpty(endpoint)) {
if (getServerList().isEmpty() && StringUtils.isEmpty(endpoint)) {
throw new NacosLoadException("serverList is empty,please check configuration");
} else {
currentIndex.set(new Random().nextInt(getServerList().size()));
}
}

Expand Down

0 comments on commit 1f87b93

Please sign in to comment.