Retry when 80092013 occurs

This commit is contained in:
Calyx Hikari 2025-07-03 12:19:48 +08:00
parent 131b87bc17
commit 9879277784
4 changed files with 24 additions and 4 deletions

7
32
View file

@ -110,7 +110,12 @@ function Main {
if (![string]::IsNullOrEmpty($regionalWorkaround)) { if (![string]::IsNullOrEmpty($regionalWorkaround)) {
$argumentList += $regionalWorkaround $argumentList += $regionalWorkaround
} }
Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait $proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
if ($proc.ExitCode -ne 0) {
Write-Warning "aria2c failed (exit code $($proc.ExitCode)). Retrying with --check-certificate=false..."
$argsRetry = $argumentList + "--check-certificate=false"
Start-Process -FilePath $aria2Exe -ArgumentList $argsRetry -NoNewWindow -Wait
}
} }
# --- Check Signature --- # --- Check Signature ---

7
64
View file

@ -131,7 +131,12 @@ function Main {
if (![string]::IsNullOrEmpty($regionalWorkaround)) { if (![string]::IsNullOrEmpty($regionalWorkaround)) {
$argumentList += $regionalWorkaround $argumentList += $regionalWorkaround
} }
Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait $proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
if ($proc.ExitCode -ne 0) {
Write-Warning "aria2c failed (exit code $($proc.ExitCode)). Retrying with --check-certificate=false..."
$argsRetry = $argumentList + "--check-certificate=false"
Start-Process -FilePath $aria2Exe -ArgumentList $argsRetry -NoNewWindow -Wait
}
} }
# --- Check Signature --- # --- Check Signature ---

7
dx
View file

@ -107,7 +107,12 @@ function Main {
if (![string]::IsNullOrEmpty($regionalWorkaround)) { if (![string]::IsNullOrEmpty($regionalWorkaround)) {
$argumentList += $regionalWorkaround $argumentList += $regionalWorkaround
} }
Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait $proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
if ($proc.ExitCode -ne 0) {
Write-Warning "aria2c failed (exit code $($proc.ExitCode)). Retrying with --check-certificate=false..."
$argsRetry = $argumentList + "--check-certificate=false"
Start-Process -FilePath $aria2Exe -ArgumentList $argsRetry -NoNewWindow -Wait
}
} }
# --- Check Signature --- # --- Check Signature ---

View file

@ -130,7 +130,12 @@ function Main {
if (![string]::IsNullOrEmpty($regionalWorkaround)) { if (![string]::IsNullOrEmpty($regionalWorkaround)) {
$argumentList += $regionalWorkaround $argumentList += $regionalWorkaround
} }
Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait $proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
if ($proc.ExitCode -ne 0) {
Write-Warning "aria2c failed (exit code $($proc.ExitCode)). Retrying with --check-certificate=false..."
$argsRetry = $argumentList + "--check-certificate=false"
Start-Process -FilePath $aria2Exe -ArgumentList $argsRetry -NoNewWindow -Wait
}
} }
# --- Check Signature --- # --- Check Signature ---