[openwrt/openwrt] download: use reasonable timeout and retry parameters
LEDE Commits
lede-commits at lists.infradead.org
Sat Nov 15 06:48:34 PST 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/337557a158a604f7b4eadf9044f4a0e7b514bb1d
commit 337557a158a604f7b4eadf9044f4a0e7b514bb1d
Author: Andy Chiang <AndyChiang_git at outlook.com>
AuthorDate: Sat Nov 15 20:19:02 2025 +0700
download: use reasonable timeout and retry parameters
Set a timeout of 5 seconds and 3 retries to reduce the time it takes for connection timeout.
Signed-off-by: Andy Chiang <AndyChiang_git at outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19977
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
scripts/download.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/download.pl b/scripts/download.pl
index 09dc91b04b..25b52d82ec 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -124,12 +124,12 @@ sub download_cmd {
my $filename = shift;
if ($download_tool eq "curl") {
- return (qw(curl -f --connect-timeout 20 --retry 5 --location),
+ return (qw(curl -f --connect-timeout 5 --retry 3 --location),
$check_certificate ? () : '--insecure',
shellwords($ENV{CURL_OPTIONS} || ''),
$url);
} elsif ($download_tool eq "wget") {
- return (qw(wget --tries=5 --timeout=20 --output-document=-),
+ return (qw(wget --tries=3 --timeout=5 --output-document=-),
$check_certificate ? () : '--no-check-certificate',
shellwords($ENV{WGET_OPTIONS} || ''),
$url);
More information about the lede-commits
mailing list