Merge pull request #317 from hxy1991/hotfix_316

Fixes #316
This commit is contained in:
Keep 2018-11-20 14:39:29 +08:00 committed by GitHub
commit 9fafcda744
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,6 +223,12 @@ public class ServerListService implements ApplicationListener<WebServerInitializ
* @return serverlist
*/
private List<String> getApacheServerList() {
if (STANDALONE_MODE) {
List<String> serverIps = new ArrayList<String>();
serverIps.add(getFormatServerAddr(LOCAL_IP));
return serverIps;
}
// 优先从文件读取服务列表
try {
List<String> serverIps = new ArrayList<String>();
@ -241,7 +247,7 @@ public class ServerListService implements ApplicationListener<WebServerInitializ
defaultLog.error("nacos-XXXX", "[serverlist] failed to get serverlist from disk!", e);
}
if (isUseAddressServer() && !STANDALONE_MODE) {
if (isUseAddressServer()) {
try {
HttpResult result = NotifyService.invokeURL(addressServerUrl, null, null);