From 9e8f1e11d8ff6017488d5d8e577d7c846dc47a0f Mon Sep 17 00:00:00 2001 From: C-3PO Date: Sun, 14 Oct 2018 01:18:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20curl=20speed-limit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cdn/downloadWithCurl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdn/downloadWithCurl.ts b/src/cdn/downloadWithCurl.ts index 8866ee5..22d42f5 100644 --- a/src/cdn/downloadWithCurl.ts +++ b/src/cdn/downloadWithCurl.ts @@ -12,7 +12,7 @@ export default function downloadWithCurl({ host, path, tempFileName }: {host: st //... '--silent', '--limit-rate', '30m', //maximum speed of 30 MB/s = 240 MBit/s - '--speed-limit', String(100 * 1024 * 1024 / 15), //abort if less than 100 MB in 15 seconds + '--speed-limit', String(Math.round(100 * 1024 * 1024 / 15)), //abort if less than 100 MB in 15 seconds '--speed-time', '15', '--output', tempFileName, url,