-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected
6.2.5
Description
I observe a regression in v6.2.5: #44544 was fixed and is now happening again.
How to reproduce
<?php
use Symfony\Component\HttpClient\HttpClient;
use Symfony\Component\HttpClient\Exception\TransportException;
use Symfony\Component\Stopwatch\Stopwatch;
require_once __DIR__.'/vendor/autoload_runtime.php';
$client = HttpClient::create();
$stopwatch = new Stopwatch();
$stopwatch->start('not parallel');
try {
$client->request('GET', 'http://10.255.255.1', ['timeout' => 5]);
} catch (TransportException) {
echo ".";
}
echo "\n".$stopwatch->stop('not parallel')."\n";
$stopwatch->start('parallel');
$requests = [];
for ($i = 0; $i < 10; $i++) {
$requests[] = $client->request('GET', 'http://10.255.255.1', ['timeout' => 5]);
}
foreach ($requests as $response) {
try {
$response->getContent();
} catch (TransportException) {
echo ".";
}
}
echo "\n".$stopwatch->stop('parallel')."\n";
The output is:
.
default/not parallel: 8.00 MiB - 5009 ms
..........
default/parallel: 8.00 MiB - 50053 ms
But the last value should be around 5 s not 50 s.
Thanks!
Possible Solution
No response
Additional Context
No response