mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Misc
This commit is contained in:
parent
ac427ed1ec
commit
d398e84f25
2 changed files with 11 additions and 2 deletions
|
@ -96,7 +96,7 @@ internal static class Commands {
|
|||
return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, nameof(remoteCommunication)));
|
||||
}
|
||||
|
||||
remoteCommunication.TriggerMatchActively();
|
||||
remoteCommunication.TriggerMatchActivelyEarlier();
|
||||
|
||||
return bot.Commands.FormatBotResponse(Strings.Done);
|
||||
}
|
||||
|
|
|
@ -771,7 +771,16 @@ internal sealed class RemoteCommunication : IAsyncDisposable, IDisposable {
|
|||
}
|
||||
}
|
||||
|
||||
internal void TriggerMatchActively() => Utilities.InBackground(() => MatchActively());
|
||||
internal void TriggerMatchActivelyEarlier() {
|
||||
if (MatchActivelyTimer == null) {
|
||||
Utilities.InBackground(() => MatchActively());
|
||||
} else {
|
||||
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
|
||||
lock (MatchActivelySemaphore) {
|
||||
MatchActivelyTimer.Change(TimeSpan.Zero, TimeSpan.FromHours(6));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<bool?> IsEligibleForListing() {
|
||||
// Bot must be eligible for matching
|
||||
|
|
Loading…
Reference in a new issue