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

pause queue while piping #52

Closed
ronag opened this issue May 3, 2020 · 3 comments · Fixed by #76
Closed

pause queue while piping #52

ronag opened this issue May 3, 2020 · 3 comments · Fixed by #76
Labels
bug Something isn't working

Comments

@ronag
Copy link
Member

ronag commented May 3, 2020

I noticed the following comment https://github.com/mcollina/undici/blob/master/lib/client.js#L199.

I think if we don't fix this we have a serious bug where the next request can start writing to the socket interleaved with the current request body which will basically corrupt the whole client data stream. Or am I missing something?

@mcollina
Copy link
Member

mcollina commented May 3, 2020

I think that comment is old/incorrect. The queue has a parallelism of 1, so it won't start processing a new entry before the callback is called.

@ronag
Copy link
Member Author

ronag commented May 4, 2020

Are you sure? Isn't the whole thing with queue concurrency (i.e. pipelining) that multiple tasks can be running concurrently? I agree it has parallelism of what, when pipelinig is set to 1.

@mcollina
Copy link
Member

mcollina commented May 4, 2020

You are right, the problem exists.

ronag added a commit to nxtedition/undici that referenced this issue May 4, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 4, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 4, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 4, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 4, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 4, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 4, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 4, 2020
@ronag ronag added the bug Something isn't working label May 5, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 6, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 6, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 6, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 6, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 6, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 7, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 7, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 7, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 7, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 7, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 7, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 7, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 7, 2020
ronag added a commit to nxtedition/undici that referenced this issue May 7, 2020
@ronag ronag closed this as completed in #76 May 7, 2020
ronag added a commit that referenced this issue May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants