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

Hangs after returning status #47

Closed
himanshumehta1114 opened this issue Oct 13, 2020 · 0 comments · Fixed by #48
Closed

Hangs after returning status #47

himanshumehta1114 opened this issue Oct 13, 2020 · 0 comments · Fixed by #48

Comments

@himanshumehta1114
Copy link
Contributor

Bug

When I check the status for a URL that is behind VPN - which resolves DNS but does not return any response. is-reachable returns false as expected but it hangs after returning the status.

Actual behavior

is-reachable hangs after returning status.

Expected behavior

is-reachable should abort after returning status.

Debug findings

After some debug, I found that timeout is not respected by checkHttp function. pTimeout exits after the set timeout but got in checkHttp function continues to make the request. If the request gives no response, the request timeouts after a while and retries multiple times.

Solution

Currently is-reachable is using [email protected] which had some issues with timeout as described in got#997.
So upgrading got to version >= v10.1.0 and passing timeout, retry options to checkHttp function can resolve this issue.

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 a pull request may close this issue.

1 participant