-
Notifications
You must be signed in to change notification settings - Fork 62
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
MustPing with timeout #58
Comments
The convention in Go is anything prefixed by "Must" will panic. If you'd like to submit a PR for a |
I totally agree, the problem here is not that it won't panic (although I will send a PR with ShouldPing as I'd rather have that). The problem here is that it will never panic. It will just keep retrying time after time to ping. I looked at the backoff lib and it has a
I'm doing a PR now! :) |
Created PR #59. |
Hey @mgutz do you think you could make MustPing receive an optional parameter (with ...) to specify a timeout?
The issue I'm trying to avoid is that upon launching my servers, if there's no connectivity to a database, they'll just stay there trying indefinitely to connect, silently. The behavior I would expect of a well-behaved server is to fail with the proper error ("Could not connect to database at somethingsomething:3845" or something like that). That would trigger our error handling infrastructure and we'd be notified.
Do you think this is something you'd like to support? I can contribute with a PR if you'd like.
The text was updated successfully, but these errors were encountered: