Waiting on a semaphore must be outside of try

This commit is contained in:
TheBestPessimist 2023-03-08 12:10:43 +02:00 committed by TheBestPessimist
parent 7d6d0258d0
commit 9bc6a4e072

View file

@ -184,9 +184,9 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
public static async Task IncrementRunCounterAsync(string fileOrFolder)
{
await _semaphore.WaitAsync(TimeSpan.FromSeconds(1));
try
{
await _semaphore.WaitAsync(TimeSpan.FromSeconds(1));
_ = EverythingApiDllImport.Everything_IncRunCountFromFileName(fileOrFolder);
}
catch (Exception)