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

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


The following commit(s) were added to 
refs/heads/fix_reconnection_increase_connection_num by this push:
     new 07c40742ee5 Fix Session reconnection increase connection number
07c40742ee5 is described below

commit 07c40742ee59f09c88e3e2a3bb18ff1984136430
Author: HTHou <[email protected]>
AuthorDate: Mon Jun 9 15:26:24 2025 +0800

    Fix Session reconnection increase connection number
---
 .../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 ad94ad5b49f..7d94d9fd5b0 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(

Reply via email to