Wait 5s between download retries

This commit is contained in:
Imran Remtulla
2023-07-29 20:22:04 -04:00
parent d9225fd639
commit a8bfb03f58

View File

@@ -154,6 +154,7 @@ class AppsProvider with ChangeNotifier {
useExisting: useExisting, headers: headers);
} catch (e) {
if (retries > 0 && e is ClientException) {
await Future.delayed(const Duration(seconds: 5));
return await downloadFileWithRetry(url, fileNameNoExt, onProgress,
useExisting: useExisting, headers: headers, retries: (retries - 1));
} else {