From ecc015402e342c237225f8e44631674c44dd7e68 Mon Sep 17 00:00:00 2001 From: chuntaojun Date: Fri, 7 Jun 2019 21:25:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor(nacos-client):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=8E=E6=9C=ACpr=E6=97=A0=E5=85=B3=E7=9A=84=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/alibaba/nacos/client/config/impl/ClientWorker.java | 4 +--- .../nacos/config/server/service/LongPollingService.java | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java index 6aac641cb..98ae4c467 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java @@ -344,8 +344,6 @@ public class ClientWorker { List params = Arrays.asList(Constants.PROBE_MODIFY_REQUEST, probeUpdateString); - // Take a custom timeout parameter to circumvent network errors caused by network latency - List headers = new ArrayList(2); headers.add("Long-Pulling-Timeout"); headers.add("" + timeout); @@ -560,6 +558,6 @@ public class ClientWorker { ConfigFilterChainManager configFilterChainManager; private boolean isHealthServer = true; private long timeout; - private volatile double currentLongingTaskCount = 0; + private double currentLongingTaskCount = 0; private int taskPenaltyTime; } 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 d9caa2c2c..ec8ae8fff 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 @@ -241,7 +241,6 @@ public class LongPollingService extends AbstractEventListener { // AsyncContext.setTimeout()的超时时间不准,所以只能自己控制 asyncContext.setTimeout(0L); - // I think there is a problem with the task delay setting here that could easily cause a client read timeout scheduler.execute( new ClientLongPolling(asyncContext, clientMd5Map, ip, probeRequestSize, timeout, appName, tag)); }