mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Slightly improve PlayingWasBlocked logic
This commit is contained in:
@@ -1989,6 +1989,10 @@ namespace ArchiSteamFarm {
|
||||
ArchiLogger.LogGenericInfo(string.Format(Strings.BotLoggedOff, callback.Result));
|
||||
|
||||
switch (callback.Result) {
|
||||
case EResult.LoggedInElsewhere:
|
||||
// This result directly indicates that playing was blocked when we got (forcefully) disconnected
|
||||
PlayingWasBlocked = true;
|
||||
break;
|
||||
case EResult.LogonSessionReplaced:
|
||||
DateTime now = DateTime.UtcNow;
|
||||
|
||||
|
||||
@@ -247,7 +247,9 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (Bot.PlayingWasBlocked) {
|
||||
await Task.Delay(Bot.MinPlayingBlockedTTL * 1000).ConfigureAwait(false);
|
||||
for (byte i = 0; (i < Bot.MinPlayingBlockedTTL) && Bot.IsPlayingPossible; i++) {
|
||||
await Task.Delay(1000).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
if (!Bot.IsPlayingPossible) {
|
||||
Bot.ArchiLogger.LogGenericInfo(Strings.PlayingNotAvailable);
|
||||
|
||||
Reference in New Issue
Block a user