etcd4j
etcd4j copied to clipboard
Hangs on waitForChange if connection breaks
Hy!
Is there any way to get notified if the connection to the etcd server dies during a waitForChange?
Sample code:
try {
EtcdClient etcdClient = new EtcdClient(URI.create(System.getenv("etcd1.local")))
EtcdResponsePromise<EtcdKeysResponse> request = etcdClient.getDir("testDir").recursive().waitForChange().send();
request.addListener(promise -> {
//it is not executed if I kill the etcd server
});
} catch (Exception e) {
//it is not executed if I kill the etcd server
}
etcd4j version 2.12.0 is broken. please make sure to use 2.11.0
etcd4j 2.13.0 has been released, should be available soon on maven central.
@Bumper03 do you mind testing against the latest version and by setting a retry handle that stops after a number of re-connection attempts ?