mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
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!)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user