Check for cancellation after semaphore completion

It doesn’t look like anything actually calls Cancel() on this CancellationTokenSource, but if something ever does we’d want this to work properly.
pull/19/head
Yaakov 8 years ago
parent 1e3ca8f016
commit 6105a99e72

@ -695,10 +695,11 @@ namespace DepotDownloader
var task = Task.Run( async () =>
{
cts.Token.ThrowIfCancellationRequested();
try
{
await semaphore.WaitAsync().ConfigureAwait( false );
cts.Token.ThrowIfCancellationRequested();
string fileFinalPath = Path.Combine( depot.installDir, file.FileName );
string fileStagingPath = Path.Combine( stagingDir, file.FileName );

Loading…
Cancel
Save