Commit ba8e8fa8 authored by Leigh Stoller's avatar Leigh Stoller

Play with various wget timeouts, trying to not throw an error on short

transient dropouts on the wireless.
parent 7285ad6e
...@@ -197,7 +197,9 @@ if (! $pid) { ...@@ -197,7 +197,9 @@ if (! $pid) {
sleep(1); sleep(1);
my $cmd = "nice -15 $WGET --no-check-certificate ". my $cmd = "nice -15 $WGET --no-check-certificate ".
"--timeout=30 --waitretry=30 --retry-connrefused ". "--dns-timeout=30 --connect-timeout=60 --read-timeout=600 ".
"--retry-connrefused --waitretry=30 ".
"--show-progress --progress=dot:giga ".
"-q -O $localfile -i -"; "-q -O $localfile -i -";
if ($debug) { if ($debug) {
......
...@@ -985,7 +985,9 @@ sub FetchImageFile($$$) ...@@ -985,7 +985,9 @@ sub FetchImageFile($$$)
print "Downloading $url ...\n"; print "Downloading $url ...\n";
if (! open(GET, "| nice -15 $WGET --no-check-certificate ". if (! open(GET, "| nice -15 $WGET --no-check-certificate ".
"--timeout=30 --waitretry=30 --retry-connrefused ". "--dns-timeout=30 --connect-timeout=60 --read-timeout=600 ".
"--retry-connrefused --waitretry=30 ".
"--show-progress --progress=dot:giga ".
"-q -O $localfile -i -")) { "-q -O $localfile -i -")) {
print STDERR "Cannot start $WGET\n"; print STDERR "Cannot start $WGET\n";
return -1; return -1;
...@@ -1023,7 +1025,10 @@ sub FetchMetadata($) ...@@ -1023,7 +1025,10 @@ sub FetchMetadata($)
$url .= "&clientversion=" . $METADATA_CLIENTVERSION; $url .= "&clientversion=" . $METADATA_CLIENTVERSION;
my $safe_url = User::escapeshellarg($url); my $safe_url = User::escapeshellarg($url);
my $opts = ($debug ? "" : "-q"); my $opts = ($debug ? "" : "-q");
my $cmd = "$WGET $opts --no-check-certificate -O - $safe_url "; my $cmd = "$WGET $opts --no-check-certificate ".
"--dns-timeout=30 --connect-timeout=60 --read-timeout=600 ".
"--retry-connrefused --waitretry=30 ".
"-O - $safe_url ";
$cmd .= "| $DD 2>/dev/null bs=1 count=5k "; $cmd .= "| $DD 2>/dev/null bs=1 count=5k ";
if ($debug) { if ($debug) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment