From 299c533c6cb86e53493ab66cb3cd8d150097986a Mon Sep 17 00:00:00 2001 From: satjd Date: Fri, 11 Oct 2019 11:28:58 +0800 Subject: [PATCH] fix #1916 --- .../alibaba/nacos/naming/core/ServiceManager.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java b/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java index a379a8e2b..19337a33e 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java @@ -445,9 +445,9 @@ public class ServiceManager implements RecordListener { service.getClusterMap().put(cluster.getName(), cluster); } service.validate(); - if (local) { - putServiceAndInit(service); - } else { + + putServiceAndInit(service); + if (!local) { addOrReplaceService(service); } } @@ -470,9 +470,9 @@ public class ServiceManager implements RecordListener { service.getClusterMap().put(cluster.getName(), cluster); } service.validate(); - if (local) { - putServiceAndInit(service); - } else { + + putServiceAndInit(service); + if (!local) { addOrReplaceService(service); } }