Skip to content

Commit 56a9077

Browse files
authored
downloader [4.3.1 ~ 4.3.2] fixes for wget2 tcp times outs with some routers (#8100)
1 parent 9940c24 commit 56a9077

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

scripts/dev/downloader.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
VERSION=4.3.1
2+
VERSION=4.3.2
33
printDownloaderHelp(){
44
cat << EOF
55
@@ -233,11 +233,11 @@ downloader() {
233233
;;
234234
esac
235235
done
236-
if [[ "$OSTYPE" == "msys"* || "$OSTYPE" == "cygwin"* || "$OSTYPE" == "win32"* ]]; then
237-
echo "Detected Windows OS. Skipping wget2..."
238-
WGET2=0
239-
WGET2_INSTALLED=0
240-
fi
236+
# if [[ "$OSTYPE" == "msys"* || "$OSTYPE" == "cygwin"* || "$OSTYPE" == "win32"* ]]; then
237+
# echo "Detected Windows OS. Skipping wget2..."
238+
# WGET2=0
239+
# WGET2_INSTALLED=0
240+
# fi
241241
# [wget2]
242242
if command -v wget2 > /dev/null 2>&1; then
243243
WGET2_INSTALLED=1
@@ -388,8 +388,8 @@ downloader() {
388388
else
389389
if [[ "${SILENT}" == 1 ]]; then
390390
if [[ $WGET2 == 1 ]] && [[ $WGET2_INSTALLED == 1 ]]; then
391-
echo
392-
wget2 -N -nv --progress=bar --tries=${RETRY_MAX} --max-redirect=${MAX_REDIRECTS} --retry-connrefused --timeout=1500 --waitretry=${RETRY_DELAY_S} ${EXTRA_ARGS} ${FINAL_EXTRA_ARGS} ${URLS_TO_DOWNLOAD}
391+
echo ""
392+
wget2 -N -nv --no-tcp-fastopen --progress=bar --tries=${RETRY_MAX} --max-redirect=${MAX_REDIRECTS} --retry-connrefused --timeout=1500 --waitretry=${RETRY_DELAY_S} ${EXTRA_ARGS} ${FINAL_EXTRA_ARGS} ${URLS_TO_DOWNLOAD}
393393
elif [[ $CURL == 1 ]] && [[ $CURL_INSTALLED == 1 ]]; then
394394
echo
395395
curl -Z -L --silent --retry ${RETRY_MAX} --retry-delay ${RETRY_DELAY_S} --max-redirs ${MAX_REDIRECTS} --header "Connection: close" --progress-bar ${EXTRA_ARGS} ${FINAL_EXTRA_ARGS} ${URLS_TO_DOWNLOAD}
@@ -403,8 +403,8 @@ downloader() {
403403
else
404404
if [[ $WGET2 == 1 ]] && [[ $WGET2_INSTALLED == 1 ]]; then
405405
echo " [downloader] [wget2] urls:[$URLS_TO_DOWNLOAD] args:[$EXTRA_ARGS $FINAL_EXTRA_ARGS"
406-
echo
407-
wget2 -N -c --progress=bar --force-progress --tries=${RETRY_MAX} --max-redirect=${MAX_REDIRECTS} --retry-connrefused --waitretry=${RETRY_DELAY_S} --timeout=1500 ${EXTRA_ARGS} ${FINAL_EXTRA_ARGS} ${URLS_TO_DOWNLOAD}
406+
echo ""
407+
wget2 -N -c --no-tcp-fastopen --progress=bar --force-progress --tries=${RETRY_MAX} --max-redirect=${MAX_REDIRECTS} --retry-connrefused --waitretry=${RETRY_DELAY_S} --timeout=1500 ${EXTRA_ARGS} ${FINAL_EXTRA_ARGS} ${URLS_TO_DOWNLOAD}
408408
elif [[ $CURL == 1 ]] && [[ $CURL_INSTALLED == 1 ]]; then
409409
echo " [downloader] [cURL] urls:[$URLS_TO_DOWNLOAD] args:[$EXTRA_ARGS $FINAL_EXTRA_ARGS ${CONNECTION_EXTRA_ARGS[@]}]"
410410
echo

0 commit comments

Comments
 (0)