Skip to content

Commit 0aa01f6

Browse files
authored
[AINode] Return ainodeClient in clientPool
1 parent 32add57 commit 0aa01f6

File tree

1 file changed

+2
-2
lines changed
  • iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode

1 file changed

+2
-2
lines changed

iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public TSStatus createTrainingTask(TTrainingReq req) throws TException {
219219

220220
@Override
221221
public void close() throws Exception {
222-
Optional.ofNullable(transport).ifPresent(TTransport::close);
222+
clientManager.returnClient(endPoint, this);
223223
}
224224

225225
@Override
@@ -248,7 +248,7 @@ public Factory(
248248
@Override
249249
public void destroyObject(TEndPoint tEndPoint, PooledObject<AINodeClient> pooledObject)
250250
throws Exception {
251-
pooledObject.getObject().close();
251+
pooledObject.getObject().invalidate();
252252
}
253253

254254
@Override

0 commit comments

Comments
 (0)