Merge pull request #152 from mihaelabalutoiu/fix-timeout-logic

Fix timeout logic
This commit is contained in:
Gabriel 2023-08-14 14:47:38 +03:00 committed by GitHub
commit 10cc209105
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -734,7 +734,7 @@ func WaitRepoPoolNoInstances(timeout time.Duration) {
pool, err = getRepoPool(cli, authToken, repoID, repoPoolID)
handleError(err)
if len(pool.Instances) == 0 {
break
return
}
time.Sleep(5 * time.Second)
timeWaited += 5 * time.Second
@ -947,7 +947,7 @@ func WaitOrgPoolNoInstances(timeout time.Duration) {
pool, err = getOrgPool(cli, authToken, orgID, orgPoolID)
handleError(err)
if len(pool.Instances) == 0 {
break
return
}
time.Sleep(5 * time.Second)
timeWaited += 5 * time.Second