From dadbc777ecc31c86e636f61b1a2971cd7d4e5bf6 Mon Sep 17 00:00:00 2001 From: xiazhou <1187567532@qq.com> Date: Sun, 29 Sep 2024 12:28:58 +0800 Subject: [PATCH] [ISSUE #12701] delete RpcClient.request() timeout check logic. --- .../com/alibaba/nacos/common/remote/client/RpcClient.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClient.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClient.java index b9065ef5391..1369736f228 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClient.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClient.java @@ -634,9 +634,7 @@ public Response request(Request request, long timeoutMills) throws NacosExceptio int retryTimes = 0; Response response; Throwable exceptionThrow = null; - long start = System.currentTimeMillis(); - while (retryTimes <= rpcClientConfig.retryTimes() && (timeoutMills <= 0 - || System.currentTimeMillis() < timeoutMills + start)) { + while (retryTimes <= rpcClientConfig.retryTimes()) { boolean waitReconnect = false; try { if (this.currentConnection == null || !isRunning()) {