Skip to content

Commit

Permalink
Add timeout to use of curl in bootstrap.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Jul 30, 2018
1 parent b12235d commit 2994b27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def _download(path, url, probably_big, verbose, exception):
option = "-#"
else:
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,
exception=exception)

Expand Down

0 comments on commit 2994b27

Please sign in to comment.