Ensure failed download task throws OperationCanceledException so that the return code is reported correctly when it is the last task

pull/67/head
Ryan Kistner 6 years ago
parent 779a4697ab
commit 0b598b43a7

@ -898,9 +898,11 @@ namespace DepotDownloader
{
Console.WriteLine( "Failed to find any server with chunk {0} for depot {1}. Aborting.", chunkID, depot.id );
cts.Cancel();
return;
}
// Throw the cancellation exception if requested so that this task is marked failed
cts.Token.ThrowIfCancellationRequested();
TotalBytesCompressed += chunk.CompressedLength;
DepotBytesCompressed += chunk.CompressedLength;
TotalBytesUncompressed += chunk.UncompressedLength;

Loading…
Cancel
Save