[HttpClient] Revert bindto workaround
… for unaffected PHP versions Signed-off-by: Alexander M. Turek <me@derrabus.de>
This commit is contained in:
parent
7ca099579c
commit
e9afce3334
@ -193,6 +193,11 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
|
|||||||
$options['timeout'] = min($options['max_duration'], $options['timeout']);
|
$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 = [
|
$context = [
|
||||||
'http' => [
|
'http' => [
|
||||||
'protocol_version' => min($options['http_version'] ?: '1.1', '1.1'),
|
'protocol_version' => min($options['http_version'] ?: '1.1', '1.1'),
|
||||||
@ -221,7 +226,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
|
|||||||
'disable_compression' => true,
|
'disable_compression' => true,
|
||||||
], static function ($v) { return null !== $v; }),
|
], static function ($v) { return null !== $v; }),
|
||||||
'socket' => [
|
'socket' => [
|
||||||
'bindto' => $options['bindto'] ?: '0:0',
|
'bindto' => $bindto,
|
||||||
'tcp_nodelay' => true,
|
'tcp_nodelay' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user