bug #41624 [HttpClient] Revert bindto workaround for unaffected PHP versions (derrabus)
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Revert bindto workaround for unaffected PHP versions
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #41622
| License | MIT
| Doc PR | N/A
This PR reverts the changes of #38086 for PHP versions that don't need that workaround.
Commits
-------
e9afce3334
[HttpClient] Revert bindto workaround
This commit is contained in:
commit
7957b48855
@ -193,6 +193,11 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
|
||||
$options['timeout'] = min($options['max_duration'], $options['timeout']);
|
||||
}
|
||||
|
||||
$bindto = $options['bindto'];
|
||||
if (!$bindto && (70322 === \PHP_VERSION_ID || 70410 === \PHP_VERSION_ID)) {
|
||||
$bindto = '0:0';
|
||||
}
|
||||
|
||||
$context = [
|
||||
'http' => [
|
||||
'protocol_version' => min($options['http_version'] ?: '1.1', '1.1'),
|
||||
@ -221,7 +226,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
|
||||
'disable_compression' => true,
|
||||
], static function ($v) { return null !== $v; }),
|
||||
'socket' => [
|
||||
'bindto' => $options['bindto'] ?: '0:0',
|
||||
'bindto' => $bindto,
|
||||
'tcp_nodelay' => true,
|
||||
],
|
||||
];
|
||||
|
Reference in New Issue
Block a user