-
Notifications
You must be signed in to change notification settings - Fork 91
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
Set a MX timeout #25
Comments
You might also want to look at caching DNS queries. |
What if the lookup function took the context as an argument so users of the library could set their own timeout duration? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead of using the default resolver to lookup the MX record. I recommend using a custom resolver with a context timeout to prevent long-lived connections.
https://github.com/badoux/checkmail/blob/master/checkmail.go#L49
https://play.golang.org/p/HTW6-2o0qeT
The text was updated successfully, but these errors were encountered: