-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Symfony version(s) affected: 5.2.0-BETA1
Description
I tried the "RetryableHttpClient". It work perfectly when it decorate the HttpClient. when I using it inside a HttplugClient with sendRequest
, everything is ok. But with sendAsyncRequest
, I got a strange error :
In AsyncResponse.php line 241:
A chunk passthru must yield an "isLast()" chunk before ending a stream.
It don't call nor on the onFullfilled
and the onRejected
methods
How to reproduce
Simple reproducer :
<?php
// ...
$client = new RetryableHttpClient(HttpClient::create());
$httplugClient = new HttplugClient($client);
$request = $httplugClient->createRequest('GET', 'https://httpbin.org/status/429');
$httplugClient->sendAsyncRequest($request)
->then(function ($response) {
dump($response);
}, function ($reject) {
dump($reject);
});
Possible Solution
Additional context