Fix incorrect comparison when auto-retrying authorization

Previously only 1 attempt to authorize would be made
This commit is contained in:
Mike Gilfillan
2020-03-03 15:56:42 +00:00
parent f1d31dee88
commit 6b55f256ae

View File

@@ -284,7 +284,7 @@ class Client
);
$data = json_decode((string)$response->getBody(), true);
sleep(1);
} while ($maxAttempts < 0 && $data['status'] == 'pending');
} while ($maxAttempts > 0 && $data['status'] == 'pending');
return (isset($data['status']) && $data['status'] == 'valid');
}