🎥 Make videos programmatically with React
Add idle timeout to download retry conditions
pullfrog[bot]55ec6ebe5f8a
diff --git a/packages/renderer/src/assets/download-file.ts b/packages/renderer/src/assets/download-file.tsindex a5bdecee82..a502f9a84a 100644--- a/packages/renderer/src/assets/download-file.ts+++ b/packages/renderer/src/assets/download-file.ts@@ -25,6 +25,8 @@ const CANCELLED_ERROR = 'cancelled';const incorrectContentLengthToken = 'Download finished with';+const noDataSentToken = 'but the server sent no data for';+const downloadFileWithoutRetries = ({onProgress,url,@@ -69,7 +71,7 @@ const downloadFileWithoutRetries = ({rejectAndFlag(new Error(- `Tried to download file ${url}, but the server sent no data for 20 seconds`,+ `Tried to download file ${url}, ${noDataSentToken} 20 seconds`,),);}, 20000);@@ -189,6 +191,7 @@ export const downloadFile = async (message === 'aborted' ||message.includes('ECONNRESET') ||message.includes(incorrectContentLengthToken) ||+ message.includes(noDataSentToken) ||// Try again if hitting internal errorsmessage.includes('503') ||message.includes('502') ||