[HttpClient] don't fallback to HTTP/1.1 when HTTP/2 streams break

This commit is contained in:
Nicolas Grekas 2020-11-19 01:16:02 +01:00
parent 1f0a27a732
commit 0c92bc5a83
1 changed files with 1 additions and 4 deletions

View File

@ -283,10 +283,7 @@ final class CurlResponse implements ResponseInterface
curl_multi_remove_handle($multi->handle, $ch);
$waitFor[1] = (string) ((int) $waitFor[1] - 1); // decrement the retry counter
curl_setopt($ch, \CURLOPT_PRIVATE, $waitFor);
if ('1' === $waitFor[1]) {
curl_setopt($ch, \CURLOPT_HTTP_VERSION, \CURL_HTTP_VERSION_1_1);
}
curl_setopt($ch, \CURLOPT_FORBID_REUSE, true);
if (0 === curl_multi_add_handle($multi->handle, $ch)) {
continue;