Permalink
Browse files

Fix variable name in the check for number of tries to get deferred re…

…sults
  • Loading branch information...
Chuck Hagenbuch
Chuck Hagenbuch committed Mar 27, 2014
1 parent 1e533ba commit d6d6f206f7cf662e6320e24891eb086e5da87060
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/BlueStateDigital/Api.php
@@ -162,7 +162,7 @@ protected function _deferredResult($deferred_id)
// if the response code isn't HTTP_CODE_OK then we didn't get the result we wanted
if (!in_array($result->code, array(self::HTTP_CODE_OK, self::HTTP_CODE_DEFERRED_RESULT_EMPTY))) {
// did we go over our "max attempts"?
- if ($iteration >= $this->deferred_result_call_max_attempts) {
+ if ($attempt >= $this->deferred_result_call_max_attempts) {
throw new Exception('Could not retrieve deferred result. Max attempts reached.', 1);
}
// we must have received an unexpected HTTP code

0 comments on commit d6d6f20

Please sign in to comment.