jurmous / etcd4j

Java / Netty client for etcd, the highly-available key value store for shared configuration and service discovery.
Apache License 2.0
267 stars 83 forks source link

there is no exception reported #191

Closed faf-xff closed 5 years ago

faf-xff commented 5 years ago

When the server is closed and the client is connected, there is no exception reported. No logs

Here is my code

` EtcdClient etcdClient = new EtcdClient(URI.create("http://127.0.0.1:2379"));

    EtcdKeyGetRequest etcdKeyGetRequest = etcdClient.getDir("test").recursive().timeout(10, TimeUnit.SECONDS);
    EtcdKeysResponse response = null;
    try {
        response = etcdKeyGetRequest.send().get();
    } catch (Exception e) {
        logger.error("", e);
    }
    if (response != null && response.getNode().getNodes().size() > 0) {
        for (EtcdKeysResponse.EtcdNode node : response.getNode().getNodes()) {
            System.out.println(node.getKey());
            System.out.println(node.getValue());
        }
    }`