Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ElasticSearch/Transport/HTTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ protected function call($url, $method="GET", $payload=null) {
ob_start();
curl_exec($conn);
$response = ob_get_clean();
if ($response !== false) {
if (curl_errno($conn) === 0) {
$data = json_decode($response, true);
if (!$data) {
$data = array('error' => $response, "code" => curl_getinfo($conn, CURLINFO_HTTP_CODE));
Expand Down Expand Up @@ -234,7 +234,7 @@ protected function call($url, $method="GET", $payload=null) {
$error = "Couldnt resolve host";
break;
case CURLE_COULDNT_CONNECT:
$error = "Couldnt connect to host [{$this->host}], ElasticSearch down?";
$error = "Couldnt connect to host [{$this->host}:{$this->port}], ElasticSearch down?";
break;
case CURLE_OPERATION_TIMEDOUT:
$error = "Operation timed out on [$requestURL]";
Expand Down