Fix back-pressure issues when cloning responses#142
Closed
ThaNarie wants to merge 1 commit into
Closed
Conversation
Collaborator
|
I will take some times to think about how to solve it, probably with a slightly more clever PassThrough stream (one that simply drain itself when there is no downstream pipes)... |
When forking streams, if one of the streams doesn't read, and its internal buffer is full, it will stop all streams to pause. The added tests will now fail because of the 2 second timeout, but without the timeout they will pause indefinitely. re node-fetch#139
Collaborator
|
Since there isn't a good solution to this problem, we decide to put it in the KNOWN LIMIT document. See also #151 on discussion about buffer size. |
This was referenced May 1, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add tests showing that cloned responses will cause back-pressure
When forking streams, if one of the streams doesn't read, and its
internal buffer is full, it will stop all streams to pause.
The added tests will now fail because of the 2 second timeout, but
without the timeout they will pause indefinitely.
They are copies of the test above them, but with a larger response.
re #139
(Note: this are only the tests, not the actual fixes)