Skip to content

Commit 706bbf9

Browse files
author
chengyitian
committed
AJ-675: fix issue about ExclusiveDBConnectionPool not enable loadBalance;
1 parent ad36741 commit 706bbf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/xxdb/ExclusiveDBConnectionPool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ public ExclusiveDBConnectionPool(String host, int port, String uid, String pwd,
7878
if (count <= 0)
7979
throw new RuntimeException("The thread count can not be less than 0");
8080
if (!loadBalance) {
81+
// not enable loadBalance
8182
for (int i=0; i<count; ++i) {
8283
DBConnection conn = new DBConnection(false, useSSL, compress, usePython);
83-
conn.setLoadBalance(false);
84-
if(!conn.connect(host, port, uid, pwd, initialScript, enableHighAvailability, highAvailabilitySites))
84+
if(!conn.connect(host, port, uid, pwd, initialScript, enableHighAvailability, highAvailabilitySites, false, loadBalance))
8585
throw new RuntimeException("Can't connect to the specified host.");
8686
workers_.add(new AsyncWorker(conn));
8787
}

0 commit comments

Comments
 (0)