From e707c043ad5798ffe1559effdffdcd6b804f9557 Mon Sep 17 00:00:00 2001 From: nkorange Date: Fri, 11 Jan 2019 10:38:03 +0800 Subject: [PATCH] fix #609 --- .../nacos/naming/misc/NamingProxy.java | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java index b19b5b80a..75a92cf4d 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java @@ -110,21 +110,6 @@ public class NamingProxy { List 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 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); } }