diff --git a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/fileProvider/ChaptersFilesProvider.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/fileProvider/ChaptersFilesProvider.kt index cfe567d37..03682eb6f 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/fileProvider/ChaptersFilesProvider.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/fileProvider/ChaptersFilesProvider.kt @@ -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 } .launchIn(scope) - } + }.first.close() } finally { // always cancel the page progress job even if it throws an exception to avoid memory leaks pageProgressJob?.cancel()