8000 [HttpClient] Fix shared connections not being freed on PHP < 8 · symfony/symfony@cef44af · GitHub
[go: up one dir, main page]

Skip to content

Commit cef44af

Browse files
[HttpClient] Fix shared connections not being freed on PHP < 8
1 parent 42938ef commit cef44af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpClient/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)
0