Skip to content

Commit

Permalink
bug #53671 [HttpClient] Fix pausing responses before they start when …
Browse files Browse the repository at this point in the history
…using curl (nicolas-grekas)

This PR was merged into the 5.4 branch.

Discussion
----------

[HttpClient] Fix pausing responses before they start when using curl

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #53622
| License       | MIT

Curl doesn't support pausing responses before they started, that's why the call to `curl_multi_remove_handle` is needed. But the removed line breaks tracking responses that did start.

Commits
-------

c6c5303 [HttpClient] Fix pausing responses before they start when using curl
  • Loading branch information
nicolas-grekas committed Jan 29, 2024
2 parents 4a124ac + c6c5303 commit 2e025f9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Symfony/Component/HttpClient/Response/CurlResponse.php
Expand Up @@ -95,7 +95,6 @@ public function __construct(CurlClientState $multi, $ch, ?array $options = null,
$this->info['pause_handler'] = static function (float $duration) use ($ch, $multi, $execCounter) {
if (0 < $duration) {
if ($execCounter === $multi->execCounter) {
$multi->execCounter = !\is_float($execCounter) ? 1 + $execCounter : \PHP_INT_MIN;
curl_multi_remove_handle($multi->handle, $ch);
}

Expand Down

0 comments on commit 2e025f9

Please sign in to comment.