Github user cammckenzie commented on the pull request:
https://github.com/apache/curator/pull/9#issuecomment-45964598
For what I originally thought was going to be a 1 line fix, yes!
It seems to me that the wait logic is cleaner to implement at the
CuratorFramework level, rather than at the CuratorZooKeeperClient, just because
you've got a nice ConnectionStateListener framework to deal with. The
internalBlockUntilConnectedOrTimedOut() method is a bit ugly in that it has to
block in 1 second increments. Is there a reason that this can't just wait until
for the entire session timeout in one go?
As an aside, it's a bit inefficient too as it allocates and destroys a
CountDownLatch, and Watcher each iteration of the loop.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---