Skip to content

Commit

Permalink
Close curl
Browse files Browse the repository at this point in the history
  • Loading branch information
ruudboon authored and niden committed Jan 10, 2020
1 parent 75f8d67 commit a474535
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .ci/cleanup-packages.php
Expand Up @@ -42,8 +42,10 @@ public function query($url)

if (false === ($retval = curl_exec($ch))) {
print_r(curl_error($ch));
curl_close($ch);
} else {
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
switch ($httpCode) {
case "200":
return json_decode($retval);
Expand Down Expand Up @@ -89,8 +91,10 @@ public function deletePackage($packageUrl, $age)

if (false === ($retval = curl_exec($ch))) {
print_r(curl_error($ch));
curl_close($ch);
} else {
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
switch ($httpCode) {
case "200":
echo "done" . PHP_EOL;
Expand Down

0 comments on commit a474535

Please sign in to comment.