Skip to content

Commit 074127c

Browse files
Rollup merge of rust-lang#52846 - kennytm:bootstrap-curl-timeout, r=Mark-Simulacrum
Add timeout to use of `curl` in bootstrap.py. Recently we've seen a lot of "30 minutes no output" spurious errors while downloading the bootstrap compiler. This added several timeout options so if the "30 minutes no output" errors were caused by connection or transfer issue, we could fail quicker for curl to retry.
2 parents 406c7f5 + 2994b27 commit 074127c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bootstrap/bootstrap.py

+4-1
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)