Skip to content

Commit

Permalink
fix async read with string keys
Browse files Browse the repository at this point in the history
  • Loading branch information
evsign committed Nov 23, 2018
1 parent 8b98df7 commit 92ca8f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Transport/HttpTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function read(array $queries, int $concurrency = 5) : array
$openedStreams = [];

$requests = function ($queries) use(&$openedStreams) {
foreach ($queries as $query) {
foreach ($queries as $index => $query) {
/* @var Query $query */

$params = [
Expand Down Expand Up @@ -205,7 +205,7 @@ public function read(array $queries, int $concurrency = 5) : array

$uri = $this->buildRequestUri($query->getServer(), $params);

yield new Request('POST', $uri, [], $body);
yield $index => new Request('POST', $uri, [], $body);
}
};

Expand Down

0 comments on commit 92ca8f8

Please sign in to comment.