Skip to content

Commit

Permalink
Merge pull request #12 from AlexandreToyer/1.x
Browse files Browse the repository at this point in the history
Add calls to curl_close
  • Loading branch information
AlexandreToyer committed May 23, 2014
2 parents d88c296 + 1c6bcac commit 60ca074
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions oss_abstract.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ protected function queryServer($url, $data = NULL, $connexionTimeout = OssApi::D
if (class_exists('OssException')) {
throw new RuntimeException('CURL failed to execute on URL "' . $url . '"');
}
trigger_error('CURL failed to execute on URL "' . $url . '"', E_USER_WARNING);
trigger_error('CURL failed to execute on URL "' . $url . '"', E_USER_WARNING);
curl_close($rcurl);
return FALSE;
}

Expand All @@ -182,19 +183,22 @@ protected function queryServer($url, $data = NULL, $connexionTimeout = OssApi::D
if (class_exists('OssException')) {
throw new TomcatException($aResponse['http_code'], $content);
}
trigger_error('HTTP ERROR ' . $aResponse['http_code'] . ': "' . trim(strip_tags($content)) . '"', E_USER_WARNING);
return FALSE;
trigger_error('HTTP ERROR ' . $aResponse['http_code'] . ': "' . trim(strip_tags($content)) . '"', E_USER_WARNING);
curl_close($rcurl);
return FALSE;
}

// FIXME Possible problem to identify Locked Index message. Must set a lock on an index to check this
if ($this->isOSSError($content)) {
if (class_exists('OssException')) {
throw new OssException($content);
}
trigger_error('OSS Returned an error: "' . trim(strip_tags($content)) . '"', E_USER_WARNING);
trigger_error('OSS Returned an error: "' . trim(strip_tags($content)) . '"', E_USER_WARNING);
curl_close($rcurl);
return FALSE;
}


curl_close($rcurl);
return $content;
}

Expand Down

0 comments on commit 60ca074

Please sign in to comment.