This commit is contained in:
nkorange 2019-01-11 10:38:03 +08:00
parent 31c95a81c5
commit e707c043ad

View File

@ -110,21 +110,6 @@ public class NamingProxy {
List<String> serverlist = refreshServerListFromDisk();
if (!CollectionUtils.isEmpty(serverlist)) {
serverlistFromConfig = serverlist;
}
if (!CollectionUtils.isEqualCollection(serverlistFromConfig, servers) && CollectionUtils.isNotEmpty(serverlistFromConfig)) {
servers = serverlistFromConfig;
}
if (RunningConfig.getServerPort() > 0) {
lastSrvRefTime = System.currentTimeMillis();
}
} catch (Exception e) {
Loggers.SRV_LOG.warn("failed to update server list", e);
List<String> serverlist = refreshServerListFromDisk();
if (CollectionUtils.isNotEmpty(serverlist)) {
serverlistFromConfig = serverlist;
}
@ -132,6 +117,13 @@ public class NamingProxy {
if (CollectionUtils.isNotEmpty(serverlistFromConfig)) {
servers = serverlistFromConfig;
}
if (RunningConfig.getServerPort() > 0) {
lastSrvRefTime = System.currentTimeMillis();
}
} catch (Exception e) {
Loggers.SRV_LOG.warn("failed to update server list", e);
}
}