You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/08/31 02:27:44 UTC

[GitHub] [iotdb] wangchao316 commented on a diff in pull request #7181: Fix transport open bug

wangchao316 commented on code in PR #7181:
URL: https://github.com/apache/iotdb/pull/7181#discussion_r959094688


##########
influxdb-protocol/src/main/java/org/apache/iotdb/influxdb/session/InfluxDBSession.java:
##########
@@ -128,7 +128,9 @@ public void init() throws IoTDBConnectionException {
           RpcTransportFactory.INSTANCE.getTransport(
               // as there is a try-catch already, we do not need to use TSocket.wrap
               defaultEndPoint.getIp(), defaultEndPoint.getPort(), connectionTimeoutInMs);
-      transport.open();
+      if (!transport.isOpen()) {
+        transport.open();
+      }

Review Comment:
   We have written an SSL transport, which risks being opened repeatedly. The judgment is made in jdbconnection, and no problem occurs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org