Skip to content

Commit

Permalink
Don't repeatedly set the logger
Browse files Browse the repository at this point in the history
  • Loading branch information
arjenm committed Mar 8, 2024
1 parent d8267d9 commit dea3f27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Symfony/Component/HttpClient/CurlHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,10 @@ private static function createRedirectResolver(array $options, string $host, int

private function ensureState(): CurlClientState
{
$this->multi ??= new CurlClientState($this->maxHostConnections, $this->maxPendingPushes);
$this->multi->logger = $this->logger;
if (!isset($this->multi)) {
$this->multi = new CurlClientState($this->maxHostConnections, $this->maxPendingPushes);
$this->multi->logger = $this->logger;
}

return $this->multi;
}
Expand Down

0 comments on commit dea3f27

Please sign in to comment.