mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 22:20:52 +00:00
Misc
I can imagine a very narrow edge case when waiting task would return just as the previous task releases the semaphore. This delay will prevent this from happening.
This commit is contained in:
@@ -1893,8 +1893,8 @@ public sealed class Bot : IAsyncDisposable {
|
||||
return result;
|
||||
}
|
||||
|
||||
private void HandleCallbacks() {
|
||||
if (!CallbackSemaphore.Wait(0)) {
|
||||
private async Task HandleCallbacks() {
|
||||
if (!await CallbackSemaphore.WaitAsync(CallbackSleep)) {
|
||||
if (Debugging.IsUserDebugging) {
|
||||
ArchiLogger.LogGenericDebug(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, nameof(CallbackSemaphore)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user