SOLR-5577: don't start timer thread in constructor

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1555610 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2014-01-05 18:49:31 +00:00
parent d03f31156a
commit ba5ab6faa7
1 changed files with 2 additions and 8 deletions

View File

@ -35,8 +35,8 @@ public class ConnectionManager implements Watcher {
private final String name;
private CountDownLatch clientConnected;
private KeeperState state;
private boolean connected;
private KeeperState state = KeeperState.Disconnected;
private boolean connected = false;
private boolean likelyExpired = true;
private final ZkClientConnectionStrategy connectionStrategy;
@ -59,13 +59,7 @@ public class ConnectionManager implements Watcher {
this.zkServerAddress = zkServerAddress;
this.onReconnect = onConnect;
this.beforeReconnect = beforeReconnect;
reset();
}
private synchronized void reset() {
clientConnected = new CountDownLatch(1);
state = KeeperState.Disconnected;
disconnected();
}
private synchronized void connected() {