-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpClient] Fix nesteed stream in AsyncResponse #38520
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
Conversation
0f623af
to
d1c187b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that it fixes the bug.
d1c187b
to
8ba54c1
Compare
Good catch, thanks @jderusse. |
Hi, just found here since I met this error while doing something like "streaming inside streaming" with RetryableHttpClient:
The response stream generator here is empty ( symfony/src/Symfony/Component/HttpClient/Response/AsyncResponse.php Lines 250 to 286 in 906b609
Some detailsI'm using 2 different RetryableHttpClient for the inside and outside stream respectively, |
@bohanyang please don't comment on closed PRs/issues, we cannot track them and we'll forget about it despite our efforts. |
When streaming twice (streaming inside streaming) an AsycResponse the second stream will yield the LastChunk, but the first Stream won't have access to it and ends with an exception
A chunk passthru must yield an "isLast()" chunk
This PR adds a state in AsyncRsponse to remember if the lastChunk has been yielded.
Reproducer: