Skip to content

Commit

Permalink
Fix downloader memory leak (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
Syer10 authored Oct 11, 2022
1 parent 7ae837c commit f2d1c6e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Downloader(private val downloadQueue: CopyOnWriteArrayList<DownloadChapter

val pageCount = download.chapter.pageCount
for (pageNum in 0 until pageCount) {
runBlocking { getPageImage(download.mangaId, download.chapterIndex, pageNum) }
runBlocking { getPageImage(download.mangaId, download.chapterIndex, pageNum) }.first.close()
// TODO: retry on error with 2,4,8 seconds of wait
// TODO: download multiple pages at once, possible solution: rx observer's strategy is used in Tachiyomi
// TODO: fine grained download percentage
Expand Down

0 comments on commit f2d1c6e

Please sign in to comment.