🐛 Fix curl speed-limit

This commit is contained in:
C-3PO 2018-10-14 01:18:38 +02:00
parent 542cef9434
commit 9e8f1e11d8
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -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,