Skip to content

Commit edb70f8

Browse files
author
thomas.szbay
committed
fix(install): match wget's 20s connection tolerance in curl helpers
Per review feedback: --connect-timeout covers DNS, TCP, and TLS setup, so a 10-second cutoff could fail valid slow connection establishment that the wget sibling (--timeout=20) still permits. Use 20 seconds in both curl helpers to match the wget connection window.
1 parent f6ecf09 commit edb70f8

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/install-cli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ download_file() {
140140
# Bound connection setup and post-connect stalls without imposing a
141141
# total download duration.
142142
curl -fsSL --proto '=https' --tlsv1.2 \
143-
--connect-timeout 10 \
143+
--connect-timeout 20 \
144144
--speed-limit 1 --speed-time 30 \
145145
--retry 3 --retry-delay 1 --retry-connrefused \
146146
-o "$output" "$url"

scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ download_file() {
117117
# Bound connection setup and post-connect stalls without imposing a
118118
# total download duration.
119119
curl -fsSL --proto '=https' --tlsv1.2 \
120-
--connect-timeout 10 \
120+
--connect-timeout 20 \
121121
--speed-limit 1 --speed-time 30 \
122122
--retry 3 --retry-delay 1 --retry-connrefused \
123123
-o "$output" "$url"

test/scripts/install-cli.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe("install-cli.sh", () => {
5656
`);
5757

5858
expect(result.status).toBe(0);
59-
expect(result.stdout).toContain("--connect-timeout 10");
59+
expect(result.stdout).toContain("--connect-timeout 20");
6060
expect(result.stdout).toContain("--speed-limit 1 --speed-time 30");
6161
expect(result.stdout).toContain("--retry 3 --retry-delay 1 --retry-connrefused");
6262
expect(result.stdout).toContain("status=28");

test/scripts/install-sh.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe("install.sh", () => {
9797
`);
9898

9999
expect(result.status).toBe(0);
100-
expect(result.stdout).toContain("--connect-timeout 10");
100+
expect(result.stdout).toContain("--connect-timeout 20");
101101
expect(result.stdout).toContain("--speed-limit 1 --speed-time 30");
102102
expect(result.stdout).toContain("--retry 3 --retry-delay 1 --retry-connrefused");
103103
expect(result.stdout).toContain("status=28");

0 commit comments

Comments
 (0)