Skip to content

Commit

Permalink
fix: Set download timeout (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese committed May 4, 2024
1 parent 29f4cde commit 1f51974
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ if [ ! -s "$RDC" ]; then
rm -f "$RD"
rm -f "$RDC"
/run/progress.sh "$RD" "$SIZE" "$PRG" &
{ curl -r "$POS" -sfk -S -o "$RD" "$LOC"; rc=$?; } || :
{ curl -r "$POS" -sfk --connect-timeout 10 -S -o "$RD" "$LOC"; rc=$?; } || :

fKill "progress.sh"

Expand All @@ -149,7 +149,7 @@ if [ ! -s "$RDC" ]; then

html "$MSG"
/run/progress.sh "$PAT" "$SIZE" "$PRG" &
{ wget "$LOC" -O "$PAT" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || :
{ wget "$LOC" -O "$PAT" -q --no-check-certificate --timeout=10 --show-progress "$PROGRESS"; rc=$?; } || :

fKill "progress.sh"
(( rc != 0 )) && error "Failed to download $LOC , reason: $rc" && exit 60
Expand Down Expand Up @@ -222,7 +222,7 @@ else

/run/progress.sh "$PAT" "$SIZE" "$PRG" &

{ wget "$URL" -O "$PAT" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || :
{ wget "$URL" -O "$PAT" -q --no-check-certificate --timeout=10 --show-progress "$PROGRESS"; rc=$?; } || :

fKill "progress.sh"
(( rc != 0 )) && error "Failed to download $URL , reason: $rc" && exit 69
Expand Down

0 comments on commit 1f51974

Please sign in to comment.