mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-06 16:37:28 +08:00
fix: Set download timeout (#719)
This commit is contained in:
parent
29f4cde296
commit
1f51974c48
@ -126,7 +126,7 @@ if [ ! -s "$RDC" ]; then
|
|||||||
rm -f "$RD"
|
rm -f "$RD"
|
||||||
rm -f "$RDC"
|
rm -f "$RDC"
|
||||||
/run/progress.sh "$RD" "$SIZE" "$PRG" &
|
/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"
|
fKill "progress.sh"
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ if [ ! -s "$RDC" ]; then
|
|||||||
|
|
||||||
html "$MSG"
|
html "$MSG"
|
||||||
/run/progress.sh "$PAT" "$SIZE" "$PRG" &
|
/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"
|
fKill "progress.sh"
|
||||||
(( rc != 0 )) && error "Failed to download $LOC , reason: $rc" && exit 60
|
(( rc != 0 )) && error "Failed to download $LOC , reason: $rc" && exit 60
|
||||||
@ -222,7 +222,7 @@ else
|
|||||||
|
|
||||||
/run/progress.sh "$PAT" "$SIZE" "$PRG" &
|
/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"
|
fKill "progress.sh"
|
||||||
(( rc != 0 )) && error "Failed to download $URL , reason: $rc" && exit 69
|
(( rc != 0 )) && error "Failed to download $URL , reason: $rc" && exit 69
|
||||||
|
Loading…
x
Reference in New Issue
Block a user