Improve download retries.

Close https://github.com/venera-app/venera-configs/issues/39
This commit is contained in:
2025-01-26 13:29:40 +08:00
parent 2534c55ffb
commit 1564156e28

View File

@@ -487,6 +487,7 @@ Future<Res<T>> runWithRetry<T>(Future<T> Function() task,
if (i == retry - 1) { if (i == retry - 1) {
return Res.error(e.toString()); return Res.error(e.toString());
} }
await Future.delayed(Duration(seconds: i + 1));
} }
} }
throw UnimplementedError(); throw UnimplementedError();