Skip to content

Commit

Permalink
Merge pull request #1270 from lingochamp/fix/cast_exception
Browse files Browse the repository at this point in the history
fix: may throw cast exception in FileDownloadThreadPool
  • Loading branch information
Jacksgong committed Sep 1, 2019
2 parents 15dc1f3 + 7678313 commit cc58548
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private synchronized void filterOutNoExist() {
runnablePool = correctedRunnablePool;
}

public boolean isInThreadPool(final int downloadId) {
public synchronized boolean isInThreadPool(final int downloadId) {
final DownloadLaunchRunnable runnable = runnablePool.get(downloadId);
return runnable != null && runnable.isAlive();
}
Expand Down

0 comments on commit cc58548

Please sign in to comment.