Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialTimeout not working #137

Open
jeffrson opened this issue Oct 14, 2020 · 0 comments
Open

dialTimeout not working #137

jeffrson opened this issue Oct 14, 2020 · 0 comments

Comments

@jeffrson
Copy link

I have this

const etcd = new Etcd3({
                    credentials: { rootCertificate: fs.readFileSync(etcdCertFile) },
                    dialTimeout: 5000,
                    hosts: "hostname:port"
                })
const cfg = await etcd.get("/cfg").string()

I would expect it to throw an exception after 5 seconds if the host is not reachable.

Instead it seems there are 3 connections tries, lasting about 21 seconds each, after which a GRPCUnavailableError occurs. The dialTimeout can be changed, but it doesn't matter.

Is there another way to configure the connection timeout?

BTW, afaict, the example of "defaultCallOptions" for 10 second deadline is wrong - it shouldn't just return a number, but something like { deadline: ... }.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant