Skip to content

Commit e624e5d

Browse files
committed
Adjust retry times
1 parent 532274a commit e624e5d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: action.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ runs:
7474
$OutFile
7575
)
7676
77-
$maxRetries = 3
77+
$maxRetries = 5
7878
$retryCount = 0
79+
$delay = 2
7980
$success = $false
8081
8182
while (-not $success -and $retryCount -lt $maxRetries) {
@@ -84,8 +85,9 @@ runs:
8485
$success = $true
8586
} catch [System.Net.WebException] {
8687
Write-Output "Attempt $($retryCount + 1) failed. Retrying..."
87-
Start-Sleep -Seconds 3
88+
Start-Sleep -Seconds $delay
8889
$retryCount++
90+
$delay += $delay
8991
}
9092
}
9193
@@ -94,7 +96,7 @@ runs:
9496
}
9597
}
9698
97-
Invoke-WebRequest-With-Retry "https://cygwin.com/$setupFileName" $setupExe
99+
Invoke-WebRequest-With-Retry "https://cygwin.com/bad/$setupFileName" $setupExe
98100
99101
if ((Get-Item -LiteralPath $setupExe).Length -eq 0) {
100102
throw "The downloaded setup has a zero length!"

0 commit comments

Comments
 (0)