From 371dbddac3a1470309c1b8b8f703560fdac88eca Mon Sep 17 00:00:00 2001 From: yuanlinzhu Date: Tue, 29 Oct 2024 11:18:02 +0800 Subject: [PATCH] fix IdleHeartBeat inner 2399 --- .../actiontech/dble/backend/datasource/PhysicalDatasource.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/actiontech/dble/backend/datasource/PhysicalDatasource.java b/src/main/java/com/actiontech/dble/backend/datasource/PhysicalDatasource.java index d22d0de00d..eb6e9b67db 100644 --- a/src/main/java/com/actiontech/dble/backend/datasource/PhysicalDatasource.java +++ b/src/main/java/com/actiontech/dble/backend/datasource/PhysicalDatasource.java @@ -248,12 +248,11 @@ private void longIdleHeartBeat(ConcurrentLinkedQueue linkedQu break; } else if (con.isClosed()) { continue; - } else if (con.getLastTime() < hearBeatTime) { //if the connection is idle for a long time + } else if (!con.isBorrowed()) { //if the connection is idle for a long time con.setBorrowed(true); new ConnectionHeartBeatHandler().doHeartBeat(con); } else { linkedQueue.offer(con); - break; } } }