Skip to content
This repository was archived by the owner on Feb 27, 2022. It is now read-only.

Commit 3079938

Browse files
Mark TolmacsMark Tolmacs
authored andcommitted
Attempting to fix crash due to already closed Fetch instance.
1 parent f7267b0 commit 3079938

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

android/src/main/java/com/eko/RNBackgroundDownloaderModule.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,12 @@ public void onCompleted(Download download) {
312312
}
313313

314314
removeFromMaps(download.getId());
315-
fetch.remove(download.getId());
315+
if (!fetch.isClosed()) {
316+
fetch.remove(download.getId());
317+
}
316318
}
317319
}
318-
320+
319321
@Override
320322
public void onProgress(Download download, long l, long l1) {
321323
synchronized(sharedLock) {

0 commit comments

Comments
 (0)