arshadmohammad commented on a change in pull request #1626:
URL: https://github.com/apache/zookeeper/pull/1626#discussion_r591291428
##########
File path:
zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeperMain.java
##########
@@ -249,6 +261,17 @@ protected void connectToZK(String newHost) throws
InterruptedException, IOExcept
System.setProperty(ZKClientConfig.SECURE_CLIENT, "true");
System.out.println("Secure connection is enabled");
}
+ if (cl.getOption("waitforconnection") != null) {
+ connectLatch = new CountDownLatch(1);
+ }
+ int timeout = Integer.parseInt(cl.getOption("timeout"));
+ zk = new ZooKeeperAdmin(host, timeout, new MyWatcher(), readOnly);
Review comment:
No need to create ZooKeeperAdmin twice.
Also move all these changes after line number 289
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]