Skip to content

Commit

Permalink
bug #47145 [HttpClient] Fix shared connections not being freed on PHP…
Browse files Browse the repository at this point in the history
… < 8 (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Fix shared connections not being freed on PHP < 8

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #46937
| License       | MIT
| Doc PR        | -

Commits
-------

cef44afeaf [HttpClient] Fix shared connections not being freed on PHP < 8
  • Loading branch information
nicolas-grekas committed Aug 2, 2022
2 parents 43b2800 + 653dc41 commit 9f9dd96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Internal/CurlClientState.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function reset()
curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_DNS);
curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_SSL_SESSION);

if (\defined('CURL_LOCK_DATA_CONNECT')) {
if (\defined('CURL_LOCK_DATA_CONNECT') && \PHP_VERSION_ID >= 80000) {
curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_CONNECT);
}
}
Expand Down

0 comments on commit 9f9dd96

Please sign in to comment.