Skip to content

Commit ab653b4

Browse files
authored
Fix SessionConnection opens too much transport without closing (#15649)
1 parent 51bad1e commit ab653b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ private void init(TEndPoint endPoint, boolean useSSL, String trustStore, String
182182
DeepCopyRpcTransportFactory.setDefaultBufferCapacity(session.thriftDefaultBufferSize);
183183
DeepCopyRpcTransportFactory.setThriftMaxFrameSize(session.thriftMaxFrameSize);
184184
try {
185+
if (transport != null && transport.isOpen()) {
186+
close();
187+
}
185188
if (useSSL) {
186189
transport =
187190
DeepCopyRpcTransportFactory.INSTANCE.getTransport(

0 commit comments

Comments
 (0)