Fix Downloader Memory Leak (#880)

This commit is contained in:
Mitchell Syer
2024-02-19 11:06:13 -05:00
committed by GitHub
parent 07e011092a
commit b18c155e22

View File

@@ -53,7 +53,7 @@ abstract class ChaptersFilesProvider(val mangaId: Int, val chapterId: Int) : Dow
step(null, false) // don't throw on canceled download here since we can't do anything step(null, false) // don't throw on canceled download here since we can't do anything
} }
.launchIn(scope) .launchIn(scope)
} }.first.close()
} finally { } finally {
// always cancel the page progress job even if it throws an exception to avoid memory leaks // always cancel the page progress job even if it throws an exception to avoid memory leaks
pageProgressJob?.cancel() pageProgressJob?.cancel()