don't add to the num open count until the constructor is finished

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1236958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-01-28 02:17:37 +00:00
parent 5a020a48d2
commit 1c24188e0b
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,6 @@ public class SolrZkClient {
public SolrZkClient(String zkServerAddress, int zkClientTimeout,
ZkClientConnectionStrategy strat, final OnReconnect onReconnect, int clientConnectTimeout) throws InterruptedException,
TimeoutException, IOException {
numOpens.incrementAndGet();
connManager = new ConnectionManager("ZooKeeperConnection Watcher:"
+ zkServerAddress, this, zkServerAddress, zkClientTimeout, strat, onReconnect);
strat.connect(zkServerAddress, zkClientTimeout, connManager,
@ -141,6 +140,7 @@ public class SolrZkClient {
}
});
connManager.waitForConnected(clientConnectTimeout);
numOpens.incrementAndGet();
}
/**