Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Renamed done to ready as it better implies the status of the response
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Apr 29, 2015
1 parent b05ba31 commit 3f5d6b7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/HttpClientAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,20 @@ public function getRequestFactory()
*/
public function __invoke(array $request)
{
$done = false;
$ready = false;
$httpRequest = $this->requestFactory->create($request, $this->httpClient, $this->loop);
return new FutureArray($httpRequest->then(function ($arg) use (&$done) {
$done = true;
return new FutureArray($httpRequest->then(function ($arg) use (&$ready) {
$ready = true;
return $arg;
}, function ($error) use (&$done) {
$done = true;
}, function ($error) use (&$ready) {
$ready = true;
return [
'error' => $error,
];
}), function () use (&$done) {
}), function () use (&$ready) {
do {
$this->loop->tick();
} while (!$done);
} while (!$ready);
});
}
}

0 comments on commit 3f5d6b7

Please sign in to comment.