Skip to content

Commit 9bc6a4e

Browse files
TheBestPessimistTheBestPessimist
authored andcommitted
Waiting on a semaphore must be outside of try
1 parent 7d6d025 commit 9bc6a4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ private static void CheckAndThrowExceptionOnError()
184184

185185
public static async Task IncrementRunCounterAsync(string fileOrFolder)
186186
{
187+
await _semaphore.WaitAsync(TimeSpan.FromSeconds(1));
187188
try
188189
{
189-
await _semaphore.WaitAsync(TimeSpan.FromSeconds(1));
190190
_ = EverythingApiDllImport.Everything_IncRunCountFromFileName(fileOrFolder);
191191
}
192192
catch (Exception)

0 commit comments

Comments
 (0)