From ef212ccad12e65d0a030172c4e241862ff899759 Mon Sep 17 00:00:00 2001 From: zhuyou1234 Date: Tue, 3 Jan 2023 11:57:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96=20(#9752)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整timeout位置 --- .../nacos/config/server/service/LongPollingService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java index 9c3160c03..86fc8763c 100755 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java @@ -246,11 +246,12 @@ public class LongPollingService { int delayTime = SwitchService.getSwitchInteger(SwitchService.FIXED_DELAY_TIME, 500); // Add delay time for LoadBalance, and one response is returned 500 ms in advance to avoid client timeout. - long timeout = Math.max(10000, Long.parseLong(str) - delayTime); + long timeout = -1L; if (isFixedPolling()) { timeout = Math.max(10000, getFixedPollingInterval()); // Do nothing but set fix polling timeout. } else { + timeout = Math.max(10000, Long.parseLong(str) - delayTime); long start = System.currentTimeMillis(); List changedGroups = MD5Util.compareMd5(req, rsp, clientMd5Map); if (changedGroups.size() > 0) {