From 1c24188e0b4bf921b9a96caa9d4b641fe6aef8c1 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Sat, 28 Jan 2012 02:17:37 +0000 Subject: [PATCH] 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 --- .../src/java/org/apache/solr/common/cloud/SolrZkClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java index 098405de588..f7746124bfb 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java @@ -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(); } /**