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: do not setup the response timeout if the stream has already ended #53

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

nlf
Copy link
Contributor

@nlf nlf commented Mar 24, 2022

this change ensures we will not trigger a timeout caused by a slow
stream pipeline if the stream has already ended. this subtly shifts the
meaning of the timeout from "the response has been fully consumed" to
"the socket behind the response has finished" which i feel maintains the
spirit of the timeout while also not needlessly throwing errors when
we're not using the socket any more.

fixes npm/cli#3078

this change ensures we will not trigger a timeout caused by a slow
stream pipeline if the stream has already ended. this subtly shifts the
meaning of the timeout from "the response has been fully consumed" to
"the socket behind the response has finished" which i feel maintains the
spirit of the timeout while also not needlessly throwing errors when
we're not using the socket any more.
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.

[BUG] Getting constant FetchError...reason: Socket timeout when installing packages
2 participants