Skip to content

Commit

Permalink
[HttpClient] correctly clean state on destruct in CurlResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Mar 28, 2019
1 parent c30f462 commit 332a88c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpClient/Response/CurlResponse.php
Expand Up @@ -231,7 +231,7 @@ protected static function perform(\stdClass $multi, array &$responses = null): v

while ($info = curl_multi_info_read($multi->handle)) {
$multi->handlesActivity[(int) $info['handle']][] = null;
$multi->handlesActivity[(int) $info['handle']][] = \in_array($info['result'], [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) ? null : new TransportException(curl_error($info['handle']));
$multi->handlesActivity[(int) $info['handle']][] = \in_array($info['result'], [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || (\CURLE_WRITE_ERROR === $info['result'] && 'destruct' === @curl_getinfo($info['handle'], CURLINFO_PRIVATE)) ? null : new TransportException(curl_error($info['handle']));
}
} finally {
self::$performing = false;
Expand Down

0 comments on commit 332a88c

Please sign in to comment.