Preconditions.checkState(zkService.isInitialised(),
"ZooKeeperService not initialised in ZKCS.connect()");
if (client != null) {
client.getZK().close();
}
InitCallback cb = new InitCallback() {
/*
* Synchronization notes: from this method, the callback comes from the
* same thread. That's not guaranteed afterwards, because this gets called
* again on SessionExpiredException.
*