diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java b/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java index ba5a7a256..3980c8ab6 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java @@ -36,9 +36,9 @@ import static com.alibaba.nacos.client.utils.LogUtils.NAMING_LOGGER; */ public class HostReactor { - public static final long DEFAULT_DELAY = 1000L; + private static final long DEFAULT_DELAY = 1000L; - public long updateHoldInterval = 5000L; + private static final long UPDATE_HOLD_INTERVAL = 5000L; private final Map> futureMap = new HashMap>(); @@ -234,11 +234,11 @@ public class HostReactor { } else if (updatingMap.containsKey(serviceName)) { - if (updateHoldInterval > 0) { + if (UPDATE_HOLD_INTERVAL > 0) { // hold a moment waiting for update finish synchronized (serviceObj) { try { - serviceObj.wait(updateHoldInterval); + serviceObj.wait(UPDATE_HOLD_INTERVAL); } catch (InterruptedException e) { NAMING_LOGGER.error("[getServiceInfo] serviceName:" + serviceName + ", clusters:" + clusters, e); }