Skip to content

Commit

Permalink
changed RetryHandler method name for deciding retries
Browse files Browse the repository at this point in the history
  • Loading branch information
kcasas committed Jul 14, 2017
1 parent 11b1260 commit 6e62057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Zendesk/API/Middleware/RetryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(array $config = [])
*
* @return callable
*/
public function decider()
public function shouldRetryRequest()
{
return function ($retries, Request $request, $response, $exception) {
if ($retries >= $this->options['max']) {
Expand Down Expand Up @@ -76,7 +76,7 @@ public function delay()
*/
public function __invoke(callable $handler)
{
$retryMiddleware = new RetryMiddleware($this->decider(), $handler, $this->delay());
$retryMiddleware = new RetryMiddleware($this->shouldRetryRequest(), $handler, $this->delay());

return $retryMiddleware;
}
Expand Down

0 comments on commit 6e62057

Please sign in to comment.