Skip to content

Commit 065ad18

Browse files
author
chengyitian
committed
AJ-831: add log error for 'try reconnect nums';
1 parent 48b3143 commit 065ad18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/com/xxdb/DBConnection.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,8 +1035,10 @@ public void switchDataNode(Node node) throws IOException{
10351035
}
10361036
} while (!closed_ && (tryReconnectNums == -1 || attempt < tryReconnectNums));
10371037

1038-
if (!closed_ && !isConnected)
1038+
if (!closed_ && !isConnected) {
1039+
log.error("Connect to " + node.hostName + ":" + node.port + " failed after " + attempt + " reconnect attempts.");
10391040
throw new RuntimeException("Connect to " + node.hostName + ":" + node.port + " failed after " + attempt + " reconnect attempts.");
1041+
}
10401042

10411043
if (initialScript_!=null && initialScript_.length() > 0){
10421044
run(initialScript_);

0 commit comments

Comments
 (0)