diff --git a/ArchiSteamFarm/Steam/Bot.cs b/ArchiSteamFarm/Steam/Bot.cs index 725238e00dbfb..61be905ed3c2a 100644 --- a/ArchiSteamFarm/Steam/Bot.cs +++ b/ArchiSteamFarm/Steam/Bot.cs @@ -2177,8 +2177,8 @@ private async Task HandleLoginResult(EResult result, EResult extendedResult) { } break; - case EResult.AccessDenied when string.IsNullOrEmpty(BotDatabase.RefreshToken) && (++LoginFailures >= MaxLoginFailures): - case EResult.InvalidPassword when string.IsNullOrEmpty(BotDatabase.RefreshToken) && (++LoginFailures >= MaxLoginFailures): + case EResult.AccessDenied when string.IsNullOrEmpty(RefreshToken) && (++LoginFailures >= MaxLoginFailures): + case EResult.InvalidPassword when string.IsNullOrEmpty(RefreshToken) && (++LoginFailures >= MaxLoginFailures): LoginFailures = 0; ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.BotInvalidPasswordDuringLogin, MaxLoginFailures)); Stop(); @@ -2734,11 +2734,11 @@ private async void OnDisconnected(SteamClient.DisconnectedCallback callback) { case EResult.AccountDisabled: // Do not attempt to reconnect, those failures are permanent return; - case EResult.AccessDenied when !string.IsNullOrEmpty(BotDatabase.RefreshToken): - case EResult.Expired when !string.IsNullOrEmpty(BotDatabase.RefreshToken): - case EResult.InvalidPassword when !string.IsNullOrEmpty(BotDatabase.RefreshToken): + case EResult.AccessDenied when !string.IsNullOrEmpty(RefreshToken): + case EResult.Expired when !string.IsNullOrEmpty(RefreshToken): + case EResult.InvalidPassword when !string.IsNullOrEmpty(RefreshToken): // We can retry immediately - BotDatabase.RefreshToken = null; + BotDatabase.RefreshToken = RefreshToken = null; ArchiLogger.LogGenericInfo(Strings.BotRemovedExpiredLoginKey); break;