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

Fix timeout handling and require Node.js 10 #48

Merged
merged 2 commits into from Oct 17, 2020

Conversation

himanshumehta1114
Copy link
Contributor

Now, is-reachable won't hang on passing URL which resolves DNS but does not gives any response.

fixes #47

- upgrade got to v11.7.0
@himanshumehta1114
Copy link
Contributor Author

https://github.com/sindresorhus/got/blob/cf4fdad553f4bec82a9972dda40f5762f8c70c6d/package.json#L10

The latest version of got supports node >= 10. So can we update node version in is-reachable as well ?
Got is dependency of is-reachable so it fails on node v8.

@sindresorhus
Copy link
Owner

So can we update node version in is-reachable as well ?

👍🏻

@himanshumehta1114
Copy link
Contributor Author

@silverwind @sindresorhus can we merge this?

@sindresorhus sindresorhus changed the title add timeout to got Fix timeout handling and require Node.js 10 Oct 17, 2020
@sindresorhus sindresorhus merged commit 50d61e8 into sindresorhus:master Oct 17, 2020
https: {
rejectUnauthorized: false
},
retry: 0,
Copy link

@jkff jkff Aug 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we need to disable retries here? This is a pretty draconian way to check that a URL is reachable - many failures, such as ECONNRESET, can be intermittent.

I hit this while using another CLI tool that uses this library and refuses to do anything if one of the services it wants is "unreachable". The service gives me a ECONNRESET about 20% of the time, meaning, I need a retry loop around invoking the whole tool.

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.

Hangs after returning status
3 participants