Skip to content

Commit

Permalink
[HttpClient] Fix shared connections not being freed on PHP < 8
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 1, 2022
1 parent 9006324 commit 653dc41
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 653dc41

Please sign in to comment.