mirror of
https://github.com/anikeen-com/yaac.git
synced 2026-10-31 21:09:03 +00:00
Don't sleep when validation succesfull
Currently the validate function will always sleep, even if the validation was succesfull. Sleeping is only needed when we need to retry.
This commit is contained in:
1 parent
a4ab65b24f
commit
7284608c2f
1 file changed
+1
-1
+1
-1
@@ -297,7 +297,7 @@ class Client
|
|||||||
$this->signPayloadKid(null, $challenge->getAuthorizationURL())
|
$this->signPayloadKid(null, $challenge->getAuthorizationURL())
|
||||||
);
|
);
|
||||||
$data = json_decode((string)$response->getBody(), true);
|
$data = json_decode((string)$response->getBody(), true);
|
||||||
if ($maxAttempts > 1) {
|
if ($maxAttempts > 1 && $data['status'] != 'valid') {
|
||||||
sleep(ceil(15 / $maxAttempts));
|
sleep(ceil(15 / $maxAttempts));
|
||||||
}
|
}
|
||||||
$maxAttempts--;
|
$maxAttempts--;
|
||||||
|
|||||||
Reference in new issue
Block a user