Skip to content

Commit

Permalink
Delete output file if task is cancelled.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregyjames committed Aug 5, 2024
1 parent 4cad621 commit 568c2bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OctaneEngine/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ await Parallel.ForEachAsync(pieces, options, async (piece, token) =>
_config?.ProgressCallback?.Invoke((double)tasksDone / _config.Parts);
}).ConfigureAwait(false);
}
catch (OperationCanceledException ex)

Check warning on line 211 in OctaneEngine/Engine.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex' is declared but never used

Check warning on line 211 in OctaneEngine/Engine.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex' is declared but never used

Check warning on line 211 in OctaneEngine/Engine.cs

View workflow job for this annotation

GitHub Actions / Deploy

The variable 'ex' is declared but never used

Check warning on line 211 in OctaneEngine/Engine.cs

View workflow job for this annotation

GitHub Actions / Deploy

The variable 'ex' is declared but never used

Check warning on line 211 in OctaneEngine/Engine.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex' is declared but never used
{
logger.LogError("TASK WAS CANCELLED.");
File.Delete(filename);
}
catch (Exception ex)
{
logger.LogError($"ERROR USING CORE CLIENT: {ex.Message}");
Expand Down

0 comments on commit 568c2bd

Please sign in to comment.