8000 [HttpClient] Revert bindto workaround · symfony/symfony@e9afce3 · GitHub
[go: up one dir, main page]

Skip to content

Commit e9afce3

Browse files
committed
[HttpClient] Revert bindto workaround
… for unaffected PHP versions Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 7ca0995 commit e9afce3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Symfony/Component/HttpClient/NativeHttpClient.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ public function request(string $method, string $url, array $opti 8000 ons = []): Respo
193193
$options['timeout'] = min($options['max_duration'], $options['timeout']);
194194
}
195195

196+
$bindto = $options['bindto'];
197+
if (!$bindto && (70322 === \PHP_VERSION_ID || 70410 === \PHP_VERSION_ID)) {
198+
$bindto = '0:0';
199+
}
200+
196201
$context = [
197202
'http' => [
198203
'protocol_version' => min($options['http_version'] ?: '1.1', '1.1'),
@@ -221,7 +226,7 @@ public function request(string $method, string $url, array $options = []): Respo
221226
'disable_compression' => true,
222227
], static function ($v) { return null !== $v; }),
223228
'socket' => [
224-
'bindto' => $options['bindto'] ?: '0:0',
229+
'bindto' => $bindto,
225230
'tcp_nodelay' => true,
226231
],
227232
];

0 commit comments

Comments
 (0)
0