Skip to content

Commit cc58548

Browse files
authored
Merge pull request #1270 from lingochamp/fix/cast_exception
fix: may throw cast exception in FileDownloadThreadPool
2 parents 15dc1f3 + 7678313 commit cc58548

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadThreadPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private synchronized void filterOutNoExist() {
121121
runnablePool = correctedRunnablePool;
122122
}
123123

124-
public boolean isInThreadPool(final int downloadId) {
124+
public synchronized boolean isInThreadPool(final int downloadId) {
125125
final DownloadLaunchRunnable runnable = runnablePool.get(downloadId);
126126
return runnable != null && runnable.isAlive();
127127
}

0 commit comments

Comments
 (0)