Skip to content

Commit

Permalink
improe robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Jan 9, 2025
1 parent a424ba1 commit efe0f0b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ public static void printProgress(Thread downloadThread,
Set<String> already = new HashSet<String>();
while (Thread.currentThread().isAlive() && downloadThread.isAlive()) {
long waitMillis = 0;
while (consumer.get().get(TOTAL_PROGRESS_KEY) < 1.0 && waitMillis < 3000) {
while ((consumer.get().get(TOTAL_PROGRESS_KEY) == null || consumer.get().get(TOTAL_PROGRESS_KEY) < 1.0)
&& waitMillis < 3000) {
Thread.sleep(30);
waitMillis += 30;
}
Expand Down

0 comments on commit efe0f0b

Please sign in to comment.