You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2025/06/05 08:34:10 UTC

(iotdb) 01/01: Fix SessionConnection opens too much transport without closing

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch fix_SessionConnection
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 303f14ed7ebb18d111be98318574f7669a876855
Author: HTHou <ha...@apache.org>
AuthorDate: Thu Jun 5 16:33:46 2025 +0800

    Fix SessionConnection opens too much transport without closing
---
 .../src/main/java/org/apache/iotdb/session/SessionConnection.java      | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java
index 491071f093a..4d4fdc28041 100644
--- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java
+++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java
@@ -182,6 +182,9 @@ public class SessionConnection {
     DeepCopyRpcTransportFactory.setDefaultBufferCapacity(session.thriftDefaultBufferSize);
     DeepCopyRpcTransportFactory.setThriftMaxFrameSize(session.thriftMaxFrameSize);
     try {
+      if (transport != null && transport.isOpen()) {
+        close();
+      }
       if (useSSL) {
         transport =
             DeepCopyRpcTransportFactory.INSTANCE.getTransport(