We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de9aec7 commit 401c464Copy full SHA for 401c464
scripts/download-binaries.ts
@@ -37,7 +37,12 @@ type Architecture = keyof typeof RUST_TARGET_TRIPLES[Platform];
37
38
async function downloadFile(url: string, dest: string): Promise<void> {
39
const streamPipeline = promisify(pipeline);
40
- const response = await fetch(url);
+ const controller = new AbortController();
41
+ const timeoutId = setTimeout(() => controller.abort(), 60000); // 60 seconds timeout
42
+
43
+ const response = await fetch(url, {
44
+ signal: controller.signal,
45
+ }).finally(() => clearTimeout(timeoutId));
46
47
if (!response.ok) {
48
throw new Error(`Download failed: '${url}' (${response.status})`);
0 commit comments