Skip to content

Add timeout to DNS check #29

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

Merged
merged 1 commit into from
Sep 3, 2015
Merged

Add timeout to DNS check #29

merged 1 commit into from
Sep 3, 2015

Conversation

benbalter
Copy link
Contributor

This creates a shared 10 second timeout between HTTP and DNS checks, and better guards against failing loudly if the DNS check fails for whatever reason.

If the DNS check fails, any check that relies on DNS will return nil, rather than returning a false positive/negative. Check! will return an InvalidDNS error.

Last, memoize served_by_pages? to save on subsequent calls (which may also timeout).

/cc @nuclearsandwich

@benbalter benbalter self-assigned this Sep 3, 2015
benbalter added a commit that referenced this pull request Sep 3, 2015
Add timeout to DNS check
@benbalter benbalter merged commit 2cf39ce into master Sep 3, 2015
@benbalter benbalter deleted the timeout branch September 3, 2015 14:35
@benbalter benbalter mentioned this pull request Sep 3, 2015
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

Successfully merging this pull request may close these issues.

1 participant