build: do not retry for connrefused (#3402)

* build: do not retry for connrefused

Signed-off-by: tison <wander4096@gmail.com>

* simplify layout

Signed-off-by: tison <wander4096@gmail.com>

---------

Signed-off-by: tison <wander4096@gmail.com>
This commit is contained in:
tison
2024-02-28 14:15:23 +08:00
committed by GitHub
parent 7942b8fae9
commit 33d894c1f0

View File

@@ -23,12 +23,7 @@ function retry_fetch() {
local url=$1
local filename=$2
curl \
--connect-timeout 10 \
--retry 3 \
--retry-connrefused \
-fsSL $url --output $filename || \
{
curl --connect-timeout 10 --retry 3 -fsSL $url --output $filename || {
echo "Failed to download $url"
echo "You may try to set http_proxy and https_proxy environment variables."
if [[ -z "$GITHUB_PROXY_URL" ]]; then