Skip to content

Commit b621e7d

Browse files
committed
Merge branch 'marcvdm-fix-sniffing' into 7.0
2 parents e8d035b + 269b8fc commit b621e7d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ $handler = new MockHandler([
342342
'transfer_stats' => [
343343
'total_time' => 100
344344
],
345-
'body' => fopen('somefile.json')
345+
'body' => fopen('somefile.json'),
346+
'effective_url' => 'localhost'
346347
]);
347348
$builder = ClientBuilder::create();
348349
$builder->setHosts(['somehost']);

src/Elasticsearch/ConnectionPool/SniffingConnectionPool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private function sniffConnection(Connection $connection): bool
124124
return true;
125125
}
126126

127-
private function parseClusterState(string $transportSchema, array $nodeInfo): array
127+
private function parseClusterState(string $transportSchema, $nodeInfo): array
128128
{
129129
$pattern = '/([^:]*):([0-9]+)/';
130130
$schemaAddress = $transportSchema . '_address';

src/Elasticsearch/Connections/Connection.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,10 @@ public function ping(): bool
448448
}
449449
}
450450

451-
public function sniff(): array
451+
/**
452+
* @return array|\GuzzleHttp\Ring\Future\FutureArray
453+
*/
454+
public function sniff()
452455
{
453456
$options = [
454457
'client' => [

0 commit comments

Comments
 (0)