Skip to content

Commit

Permalink
Fix[MCDL]: progress may hang due to indeterminate value
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduytran0 committed Jun 25, 2024
1 parent a9cbdda commit 073389e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Natives/MinecraftResourceDownloadTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ - (void)addDownloadTaskToProgress:(NSURLSessionDownloadTask *)task size:(NSUInte
NSProgress *progress = [self.manager downloadProgressForTask:task];
NSUInteger fileSize = size ?: 1;
progress.kind = NSProgressKindFile;
progress.totalUnitCount = fileSize;
[self.progressList addObject:progress];
[self.progress addChild:progress withPendingUnitCount:fileSize];
self.progress.totalUnitCount += fileSize;
Expand Down

0 comments on commit 073389e

Please sign in to comment.