mirror of
https://github.com/SteamRE/DepotDownloader.git
synced 2026-10-20 01:46:17 +00:00
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.
This commit is contained in:
1 parent
1e3ca8f016
commit
6105a99e72
1 file changed
+2
-1
@@ -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 );
|
||||
|
||||
Reference in new issue
Block a user