diff --git a/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/springboot/starter/core/ClientWorker.java b/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/springboot/starter/core/ClientWorker.java index aef764e3..aa997763 100644 --- a/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/springboot/starter/core/ClientWorker.java +++ b/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/springboot/starter/core/ClientWorker.java @@ -154,6 +154,9 @@ public class ClientWorker { } public List checkUpdateTpIds(String probeUpdateString, boolean isInitializingCacheList) { + if (StringUtils.isEmpty(probeUpdateString)) { + return Collections.emptyList(); + } Map params = new HashMap(2); params.put(PROBE_MODIFY_REQUEST, probeUpdateString); params.put(WEIGHT_CONFIGS, IdUtil.simpleUUID()); @@ -165,9 +168,6 @@ public class ClientWorker { if (isInitializingCacheList) { headers.put(LONG_PULLING_TIMEOUT_NO_HANGUP, "true"); } - if (StringUtils.isEmpty(probeUpdateString)) { - return Collections.emptyList(); - } try { long readTimeoutMs = timeout + (long) Math.round(timeout >> 1); Result result = agent.httpPostByConfig(LISTENER_PATH, headers, params, readTimeoutMs);