From d4bb9e3772839092bf2f513bac487f95c51b593f Mon Sep 17 00:00:00 2001 From: xinhao <1344650328@qq.com> Date: Mon, 3 Jul 2023 14:54:52 +0800 Subject: [PATCH] #1251 Resolved two registration issues (#1383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 章新好 Sunny Zhang --- .../src/main/java/cn/hippo4j/discovery/core/Lease.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/threadpool/server/discovery/src/main/java/cn/hippo4j/discovery/core/Lease.java b/threadpool/server/discovery/src/main/java/cn/hippo4j/discovery/core/Lease.java index 0d796f9e..f1b37ceb 100644 --- a/threadpool/server/discovery/src/main/java/cn/hippo4j/discovery/core/Lease.java +++ b/threadpool/server/discovery/src/main/java/cn/hippo4j/discovery/core/Lease.java @@ -47,8 +47,8 @@ public class Lease { public Lease(T r) { holder = r; registrationTimestamp = System.currentTimeMillis(); - lastUpdateTimestamp = registrationTimestamp; duration = DEFAULT_DURATION_IN_SECS; + lastUpdateTimestamp = registrationTimestamp + duration; } public void renew() {