Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ class GOGDownloadManager @Inject constructor(
downloadInfo.setActive(true)

// Start downloads by launching a separate coroutine to emit chunks
scope.launch {
val preallocJob: Job = scope.launch {
if (!downloadInfo.isActive()) {
Timber.tag("GOG").w("Download cancelled by user")
return@launch
Expand Down Expand Up @@ -982,6 +982,8 @@ class GOGDownloadManager @Inject constructor(
}
}

preallocJob.join()
Comment thread
xXJSONDeruloXx marked this conversation as resolved.

// Wait for all pending chunks to complete processing
var lastPendingChunks = pendingChunks.get()
var currentPendingChunks = lastPendingChunks
Expand Down
Loading