diff --git a/Amazon/Pay/API/HttpCurl.php b/Amazon/Pay/API/HttpCurl.php index a68d778..122e3c4 100644 --- a/Amazon/Pay/API/HttpCurl.php +++ b/Amazon/Pay/API/HttpCurl.php @@ -82,12 +82,12 @@ private function execute($ch) $response = curl_exec($ch); if ($response === false) { $error_msg = "Unable to send request, underlying exception of " . curl_error($ch); - curl_close($ch); + unset($ch); throw new \Exception($error_msg); } else { $this->curlResponseInfo = curl_getinfo($ch); } - curl_close($ch); + unset($ch); return $response; }