You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2020/11/12 07:40:44 UTC
[iotdb] branch TY400Bug updated: more log
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch TY400Bug
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/TY400Bug by this push:
new 0ab2081 more log
0ab2081 is described below
commit 0ab2081a51c95c111143a9861b8a99aa58e5bef6
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Thu Nov 12 15:40:26 2020 +0800
more log
---
.../java/org/apache/iotdb/session/Session.java | 38 ++++++++++------------
1 file changed, 18 insertions(+), 20 deletions(-)
diff --git a/session/src/main/java/org/apache/iotdb/session/Session.java b/session/src/main/java/org/apache/iotdb/session/Session.java
index 4788107..d4abb13 100644
--- a/session/src/main/java/org/apache/iotdb/session/Session.java
+++ b/session/src/main/java/org/apache/iotdb/session/Session.java
@@ -1140,26 +1140,24 @@ public class Session {
}
private boolean reconnect() {
- return false;
-
-// boolean flag = false;
-// for (int i = 1; i <= Config.RETRY_NUM; i++) {
-// try {
-// if (transport != null) {
-// close();
-// open(enableRPCCompression, connectionTimeoutInMs);
-// flag = true;
-// }
-// } catch (Exception e) {
-// try {
-// Thread.sleep(Config.RETRY_INTERVAL_MS);
-// } catch (InterruptedException e1) {
-// logger.error("reconnect is interrupted.", e1);
-// Thread.currentThread().interrupt();
-// }
-// }
-// }
-// return flag;
+ boolean flag = false;
+ for (int i = 1; i <= Config.RETRY_NUM; i++) {
+ try {
+ if (transport != null) {
+ close();
+ open(enableRPCCompression, connectionTimeoutInMs);
+ flag = true;
+ }
+ } catch (Exception e) {
+ try {
+ Thread.sleep(Config.RETRY_INTERVAL_MS);
+ } catch (InterruptedException e1) {
+ logger.error("reconnect is interrupted.", e1);
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+ return flag;
}
}
\ No newline at end of file