From 86526507a6b68863cfcac0a324d80ee3ac7b8140 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Fri, 12 Aug 2022 22:25:35 +0100 Subject: [PATCH] Increase time range and total number of attempts to fetch a QDN resource, as it previously gave up too quickly. --- .../arbitrary/ArbitraryDataFileListManager.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/qortal/controller/arbitrary/ArbitraryDataFileListManager.java b/src/main/java/org/qortal/controller/arbitrary/ArbitraryDataFileListManager.java index 60b3707b..7f10092c 100644 --- a/src/main/java/org/qortal/controller/arbitrary/ArbitraryDataFileListManager.java +++ b/src/main/java/org/qortal/controller/arbitrary/ArbitraryDataFileListManager.java @@ -123,12 +123,22 @@ public class ArbitraryDataFileListManager { } } - // Then allow another 5 attempts, each 5 minutes apart + // Then allow another 3 attempts, each 5 minutes apart if (timeSinceLastAttempt > 5 * 60 * 1000L) { // We haven't tried for at least 5 minutes - if (networkBroadcastCount < 5) { - // We've made less than 5 total attempts + if (networkBroadcastCount < 6) { + // We've made less than 6 total attempts + return true; + } + } + + // Then allow another 4 attempts, each 30 minutes apart + if (timeSinceLastAttempt > 30 * 60 * 1000L) { + // We haven't tried for at least 5 minutes + + if (networkBroadcastCount < 10) { + // We've made less than 10 total attempts return true; } }