Don't discard curl options if timeout is not defined.
Merge of 5078abdb33
This commit is contained in:
parent
9cb481a73f
commit
fdbb950495
@ -3339,7 +3339,7 @@ sub ResolveRedirectionForCurl {
|
||||
# Add a timeout flat to URL_FETCHER. Returns a new list.
|
||||
sub AddFetchTimeout {
|
||||
my $timeout = shift;
|
||||
my @fetcher = shift;
|
||||
my @fetcher = @_;
|
||||
if (defined($timeout)) {
|
||||
if (join(" ", @fetcher) =~ m/\bcurl -s/) {
|
||||
push(@fetcher, "--max-time", sprintf("%d", $timeout));
|
||||
|
Loading…
Reference in New Issue
Block a user