diff options
| author | Bond_009 <bond.009@outlook.com> | 2024-10-31 17:02:06 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2024-10-31 17:02:06 +0100 |
| commit | d2db7004024c6bbdd541a381c673f1e0b0aebfcb (patch) | |
| tree | 48d21b619b13c73fc85988d7c0b33a816b4f2c02 /Jellyfin.Api/Controllers/DynamicHlsController.cs | |
| parent | 282784cbb6fe203b87a6f2c673454ac8d3da82fa (diff) | |
Always await instead of directly returning Task
https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#prefer-asyncawait-over-directly-returning-task
The performance impact is negligible (and it's me saying that!)
Diffstat (limited to 'Jellyfin.Api/Controllers/DynamicHlsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/DynamicHlsController.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs index 54e0527c9..948592712 100644 --- a/Jellyfin.Api/Controllers/DynamicHlsController.cs +++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs @@ -2059,16 +2059,16 @@ public class DynamicHlsController : BaseJellyfinApiController } } - private Task DeleteLastFile(string playlistPath, string segmentExtension, int retryCount) + private async Task DeleteLastFile(string playlistPath, string segmentExtension, int retryCount) { var file = GetLastTranscodingFile(playlistPath, segmentExtension, _fileSystem); if (file is null) { - return Task.CompletedTask; + return; } - return DeleteFile(file.FullName, retryCount); + await DeleteFile(file.FullName, retryCount).ConfigureAwait(false); } private async Task DeleteFile(string path, int retryCount) |
