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

Check if connection is open. #19

Open
antonio-oliveira-melo opened this issue Sep 15, 2016 · 2 comments
Open

Check if connection is open. #19

antonio-oliveira-melo opened this issue Sep 15, 2016 · 2 comments

Comments

@antonio-oliveira-melo
Copy link

antonio-oliveira-melo commented Sep 15, 2016

Hi, how can I check if the thrift connection is open/valid before I use the client method? Is there a way to know if the connection was established correctly when I'm creating a thrift client?

If I just do this:

var thrift_client = thriftPool(thrift, Service, {host: "localhost", port: 9090});

How can i guarantee that the connection is working before i call a method on the client?

@MaerF0x0
Copy link

Not the maintainer, but I can tell you what I've done.

I've implemented a "Ping" endpoint in my thrift service for healthchecks. So when I create the pool, i immediately run a "Ping" to ensure the pool was able to connect.

@antonio-oliveira-melo
Copy link
Author

Yeah, guess I'll do that too. Thanks.

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

2 participants