chg: [internal] Try to close CURL connection

pull/8717/head
Jakub Onderka 2023-06-27 18:33:20 +02:00
parent c2e0ba3ce3
commit 2080e99eb7
1 changed files with 8 additions and 0 deletions

View File

@ -255,6 +255,14 @@ class CurlClient extends HttpSocketExtended
return $this->constructResponse($output, $responseHeaders, $code);
}
public function disconnect()
{
if ($this->ch) {
curl_close($this->ch);
$this->ch = null;
}
}
/**
* @param string $body
* @param array $headers