diff --git a/src/cdn/downloadWithCurl.ts b/src/cdn/downloadWithCurl.ts index 5fd38df..dd830e2 100644 --- a/src/cdn/downloadWithCurl.ts +++ b/src/cdn/downloadWithCurl.ts @@ -28,6 +28,8 @@ export default function downloadWithCurl({ host, path, tempFileName }: {host: st spawnedProcess.on('exit', function(code) { if (code === 0) { resolve(tempFileName); + } else if (code === 28) { + reject(`Download speed too slow, will restart "${url}".`); } else { reject(`Error in process:\n> curl ${parameters.join(' ')}\nNon-zero exit code ${code}.`); }