Skip to content

Commit

Permalink
fix testing attempt count
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner committed Sep 20, 2024
1 parent 4cd9a5f commit 75d788c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9674,7 +9674,7 @@ async function getUrlResponse(url, headers, attempt = 1) {
return response.text()
}
} catch (err) {
if (attempt >= MAX_HTTP_RETRIES) {
if (attempt <= MAX_HTTP_RETRIES) {
core.debug(`Error during fetch. Retrying in 1000ms: ${err}`)
await new Promise((resolve) => setTimeout(resolve, 1000))
return getUrlResponse(url, headers, attempt + 1)
Expand Down
2 changes: 1 addition & 1 deletion src/setup-beam.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ async function getUrlResponse(url, headers, attempt = 1) {
return response.text()
}
} catch (err) {
if (attempt >= MAX_HTTP_RETRIES) {
if (attempt <= MAX_HTTP_RETRIES) {
core.debug(`Error during fetch. Retrying in 1000ms: ${err}`)
await new Promise((resolve) => setTimeout(resolve, 1000))
return getUrlResponse(url, headers, attempt + 1)
Expand Down

0 comments on commit 75d788c

Please sign in to comment.