mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Add workaround for rare Steam fuckup
Under rare Steam maintenance it's possible that we can get one rare logon session replaced for no apparent reason.
This commit is contained in:
@@ -135,6 +135,7 @@ namespace ArchiSteamFarm {
|
||||
private byte HeartBeatFailures;
|
||||
private uint ItemsCount;
|
||||
private EResult LastLogOnResult;
|
||||
private DateTime LastLogonSessionReplaced = DateTime.MinValue;
|
||||
private ulong LibraryLockedBySteamID;
|
||||
private bool LootingAllowed = true;
|
||||
private bool LootingScheduled;
|
||||
@@ -1972,9 +1973,16 @@ namespace ArchiSteamFarm {
|
||||
|
||||
switch (callback.Result) {
|
||||
case EResult.LogonSessionReplaced:
|
||||
ArchiLogger.LogGenericError(Strings.BotLogonSessionReplaced);
|
||||
Stop();
|
||||
return;
|
||||
DateTime now = DateTime.UtcNow;
|
||||
|
||||
if (now.Subtract(LastLogonSessionReplaced).TotalHours < 1) {
|
||||
ArchiLogger.LogGenericError(Strings.BotLogonSessionReplaced);
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
LastLogonSessionReplaced = now;
|
||||
break;
|
||||
}
|
||||
|
||||
ReconnectOnUserInitiated = true;
|
||||
|
||||
Reference in New Issue
Block a user