-
Notifications
You must be signed in to change notification settings - Fork 86
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
Shorten timeout for DNS lookups #66
Comments
It should be a simple change. This function needs to take timeouts as well and we can have timeouts as an option to validates_email_format_of.
|
If it times out does it return invalid for the e-mail? |
alexdunae
added a commit
that referenced
this issue
May 5, 2022
alexdunae
added a commit
that referenced
this issue
May 5, 2022
alexdunae
added a commit
that referenced
this issue
May 5, 2022
Good idea. I've added that. If it times out a |
alexdunae
added a commit
that referenced
this issue
May 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default timeout for Resolv::DNS results in the validation for an unresponsive domain (like test123.com) taking at least 20 seconds. I'd like to reduce the timeout in validates_email_format_of using this since 20 seconds is way too long for a web request. Would you be okay with reducing the default timeout to 2 seconds with no retries (that would end up being 4 seconds total, one for A and one for MX)? Alternatively, validates_email_format_of can take an optional timeout number.
The text was updated successfully, but these errors were encountered: