Add missing curl_close()

This commit is contained in:
Frédéric Guillot 2019-06-04 16:40:58 -07:00
parent 4ebcf84d47
commit 9eb42aae33
1 changed files with 1 additions and 0 deletions

View File

@ -282,6 +282,7 @@ class Client extends Base
$statusCode = curl_getinfo($curlSession, CURLINFO_RESPONSE_CODE);
if ($statusCode >= 400) {
curl_close($curlSession);
throw new InvalidStatusException('Request failed with status code '.$statusCode, $statusCode, $body);
}
}