judge endpoint (#8933)
This commit is contained in:
parent
3586ad64c9
commit
65244c5de4
@ -87,7 +87,8 @@ public class ServerListManager implements ServerListFactory, Closeable {
|
|||||||
initServerAddr(properties);
|
initServerAddr(properties);
|
||||||
if (!serverList.isEmpty()) {
|
if (!serverList.isEmpty()) {
|
||||||
currentIndex.set(new Random().nextInt(serverList.size()));
|
currentIndex.set(new Random().nextInt(serverList.size()));
|
||||||
} else {
|
}
|
||||||
|
if (serverList.isEmpty() && StringUtils.isNotEmpty(endpoint)) {
|
||||||
throw new NacosLoadException("serverList is empty,please check configuration");
|
throw new NacosLoadException("serverList is empty,please check configuration");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user