Skip to content

Commit 9f9dd96

Browse files
bug #47145 [HttpClient] Fix shared connections not being freed on PHP < 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
2 parents 43b2800 + 653dc41 commit 9f9dd96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Internal/CurlClientState.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function reset()
9696
curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_DNS);
9797
curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_SSL_SESSION);
9898

99-
if (\defined('CURL_LOCK_DATA_CONNECT')) {
99+
if (\defined('CURL_LOCK_DATA_CONNECT') && \PHP_VERSION_ID >= 80000) {
100100
curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_CONNECT);
101101
}
102102
}

0 commit comments

Comments
 (0)