Skip to content

Commit 2994b27

Browse files
committed
Add timeout to use of curl in bootstrap.py.
1 parent b12235d commit 2994b27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bootstrap/bootstrap.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ def _download(path, url, probably_big, verbose, exception):
8888
option = "-#"
8989
else:
9090
option = "-s"
91-
run(["curl", option, "--retry", "3", "-Sf", "-o", path, url],
91+
run(["curl", option,
92+
"-y", "30", "-Y", "10", # timeout if speed is < 10 bytes/sec for > 30 seconds
93+
"--connect-timeout", "30", # timeout if cannot connect within 30 seconds
94+
"--retry", "3", "-Sf", "-o", path, url],
9295
verbose=verbose,
9396
exception=exception)
9497

0 commit comments

Comments
 (0)