Skip to content

Commit 653dc41

Browse files
[HttpClient] Fix shared connections not being freed on PHP < 8
1 parent 9006324 commit 653dc41

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)