Skip to content

Commit

Permalink
fix: ConcurrentModificationException
Browse files Browse the repository at this point in the history
  • Loading branch information
klxiaoniu committed Feb 8, 2024
1 parent 54f5394 commit 79c4b7b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ public boolean remove(final BaseDownloadTask.IRunningTask willRemoveDownload,
}

public boolean remove(DownloadTaskAdapter downloadTaskAdapter) {
Util.d(TAG, "remove task: " + downloadTaskAdapter.getId());
return list.remove(downloadTaskAdapter);
synchronized (list) {
Util.d(TAG, "remove task: " + downloadTaskAdapter.getId());
return list.remove(downloadTaskAdapter);
}
}

/**
Expand Down

0 comments on commit 79c4b7b

Please sign in to comment.