Skip to content

Commit

Permalink
Fixes alibaba#316
Browse files Browse the repository at this point in the history
  • Loading branch information
hxy1991 committed Nov 20, 2018
1 parent 2dacfd6 commit 0e24b70
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ private void updateIfChanged(List<String> newList) {
* @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>();
Expand All @@ -241,7 +247,7 @@ private List<String> getApacheServerList() {
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);

Expand Down

0 comments on commit 0e24b70

Please sign in to comment.