From 4260906973aeac59d70433b663cd1fd29a775ad1 Mon Sep 17 00:00:00 2001 From: nkorange Date: Thu, 14 Feb 2019 16:02:37 +0800 Subject: [PATCH] Fix #762 --- .../main/java/com/alibaba/nacos/naming/web/ApiCommands.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/web/ApiCommands.java b/naming/src/main/java/com/alibaba/nacos/naming/web/ApiCommands.java index 93daf4422..a8cfa1c01 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/web/ApiCommands.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/web/ApiCommands.java @@ -68,6 +68,7 @@ import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; +import static com.alibaba.nacos.common.util.SystemUtils.STANDALONE_MODE; import static com.alibaba.nacos.common.util.SystemUtils.readClusterConf; import static com.alibaba.nacos.common.util.SystemUtils.writeClusterConf; @@ -922,7 +923,7 @@ public class ApiCommands { final CountDownLatch countDownLatch = new CountDownLatch(RaftCore.getPeerSet().majorityCount()); updateIpPublish(proxyParams, countDownLatch, action); - if (!countDownLatch.await(UtilsAndCommons.MAX_PUBLISH_WAIT_TIME_MILLIS, TimeUnit.MILLISECONDS)) { + if (!STANDALONE_MODE && !countDownLatch.await(UtilsAndCommons.MAX_PUBLISH_WAIT_TIME_MILLIS, TimeUnit.MILLISECONDS)) { Loggers.RAFT.info("data publish failed, key=" + key, ",notify timeout."); throw new IllegalArgumentException("data publish failed, key=" + key); }