mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-13 12:52:08 +08:00
1.1.3 -> 1.1.4 第83次更新
This commit is contained in:
parent
6a7b65fe99
commit
dcef7be238
@ -9,11 +9,11 @@ namespace Sheas_Cealer.Utils
|
||||
{
|
||||
internal static class NginxCleaner
|
||||
{
|
||||
private static readonly object IsCleaningLock = new();
|
||||
private static readonly SemaphoreSlim IsCleaningSemaphore = new(1);
|
||||
|
||||
internal static async Task Clean()
|
||||
{
|
||||
if (!Monitor.TryEnter(IsCleaningLock))
|
||||
if (!await IsCleaningSemaphore.WaitAsync(0))
|
||||
return;
|
||||
|
||||
try
|
||||
@ -40,7 +40,7 @@ namespace Sheas_Cealer.Utils
|
||||
|
||||
certStore.Close();
|
||||
}
|
||||
finally { Monitor.Exit(IsCleaningLock); }
|
||||
finally { IsCleaningSemaphore.Release(); }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user