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