Add timeout to use of `curl` in bootstrap.py.
This commit is contained in:
parent
b12235db09
commit
2994b27e40
|
@ -88,7 +88,10 @@ def _download(path, url, probably_big, verbose, exception):
|
||||||
option = "-#"
|
option = "-#"
|
||||||
else:
|
else:
|
||||||
option = "-s"
|
option = "-s"
|
||||||
run(["curl", option, "--retry", "3", "-Sf", "-o", path, url],
|
run(["curl", option,
|
||||||
|
"-y", "30", "-Y", "10", # timeout if speed is < 10 bytes/sec for > 30 seconds
|
||||||
|
"--connect-timeout", "30", # timeout if cannot connect within 30 seconds
|
||||||
|
"--retry", "3", "-Sf", "-o", path, url],
|
||||||
verbose=verbose,
|
verbose=verbose,
|
||||||
exception=exception)
|
exception=exception)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue