You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When streaming responses and a response times out and gets canceled, it should then not throw anymore on __destruct. This works well without RetryableHttpClient, but when that wrapper is used it somehow still throws on __destruct.
So, I believe, this is intended, if not the following code on TransportResponseTrait.php:140 and adjusting the unit tests should resolve this issue:
try {
self::initialize($this, -0.0);
$this->checkStatusCode();
} catch (TimeoutExceptionInterface$exception) {
// ignore any timeout errors as we are destructing
}
…nceled (nicolas-grekas)
This PR was merged into the 5.3 branch.
Discussion
----------
[HttpClient] fix RetryableHttpClient when a response is canceled
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#43390, fix#43391
| License | MIT
| Doc PR | -
Commits
-------
4f827c3 [HttpClient] fix RetryableHttpClient when a response is canceled
Symfony version(s) affected: 5.3.4
Description
When streaming responses and a response times out and gets canceled, it should then not throw anymore on __destruct. This works well without RetryableHttpClient, but when that wrapper is used it somehow still throws on __destruct.
How to reproduce
Running this outputs:
The fatal error here is not expected, and commenting out the
RetryableHttpClient
fixes it.The text was updated successfully, but these errors were encountered: