Skip to content

Commit

Permalink
tweak check
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 22, 2016
1 parent 9111e0e commit 36c3220
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Illuminate/Routing/Middleware/ThrottleRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ protected function addHeaders(Response $response, $maxAttempts, $remainingAttemp
*/
protected function calculateRemainingAttempts($key, $maxAttempts, $retryAfter = null)
{
if (! is_null($retryAfter)) {
return 0;
if (is_null($retryAfter)) {
return $this->limiter->retriesLeft($key, $maxAttempts);
}

return $this->limiter->retriesLeft($key, $maxAttempts);
return 0;
}
}

0 comments on commit 36c3220

Please sign in to comment.