Skip to content

Commit

Permalink
avoid printing when the thread is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 30, 2023
1 parent d1cd92b commit 1ef234f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ public static void printProgress(Thread downloadThread,
&& consumer.get().get(TOTAL_PROGRESS_KEY) == 1.0;
int millis = keep == true || end ? 10 : 3000;
keep = false;
try {Thread.sleep(millis);} catch (InterruptedException ex) {Thread.currentThread().interrupt();}
try {Thread.sleep(millis);} catch (InterruptedException ex) {continue;}
String select = null;
for (String key : consumer.get().keySet()) {
if (!already.contains(key) && !key.equals(DownloadTracker.TOTAL_PROGRESS_KEY)) {
Expand Down

0 comments on commit 1ef234f

Please sign in to comment.