mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-02-12 16:52:51 +00:00
gentler backoffs
This commit is contained in:
@@ -19,9 +19,9 @@ Future<List<int>> fetchOSMTile({
|
||||
int attempt = 0;
|
||||
final random = Random();
|
||||
final delays = [
|
||||
0,
|
||||
3000 + random.nextInt(1000) - 500,
|
||||
10000 + random.nextInt(4000) - 2000
|
||||
4000 + random.nextInt(1000), // 4-5s after 1st failure
|
||||
15000 + random.nextInt(4000), // 15-19s after 2nd
|
||||
60000 + random.nextInt(5000), // 60-65s after 3rd
|
||||
];
|
||||
while (true) {
|
||||
await _tileFetchSemaphore.acquire();
|
||||
|
||||
Reference in New Issue
Block a user