Skip to content

Commit

Permalink
Ensure at least one source is downloading at all times
Browse files Browse the repository at this point in the history
  • Loading branch information
schroda committed Sep 25, 2024
1 parent 3c93024 commit 14b03b9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ object DownloadManager {
"Failed: ${downloadQueue.size - availableDownloads.size}"
}

if (runningDownloaders.size < serverConfig.maxSourcesInParallel.value) {
if (runningDownloaders.size < serverConfig.maxSourcesInParallel.value.coerceAtLeast(1)) {
availableDownloads
.asSequence()
.map { it.manga.sourceId }
Expand Down

0 comments on commit 14b03b9

Please sign in to comment.