Allow STD requests to fail, and continue with other ones

This commit is contained in:
Archi
2023-01-19 15:06:06 +01:00
parent a357953d0a
commit cca21900a6

View File

@@ -362,6 +362,10 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC
using (HashSet<uint>.Enumerator enumerator = appIDsToRefresh.GetEnumerator()) {
while (true) {
if (!bot.IsConnectedAndLoggedOn) {
return;
}
while ((appIDsThisRound.Count < SharedInfo.AppInfosPerSingleRequest) && enumerator.MoveNext()) {
appIDsThisRound.Add(enumerator.Current);
}
@@ -370,10 +374,6 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC
break;
}
if (!bot.IsConnectedAndLoggedOn) {
return;
}
bot.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.BotRetrievingAppAccessTokens, appIDsThisRound.Count));
SteamApps.PICSTokensCallback response;
@@ -383,7 +383,9 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC
} catch (Exception e) {
bot.ArchiLogger.LogGenericWarningException(e);
return;
appIDsThisRound.Clear();
continue;
}
bot.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.BotFinishedRetrievingAppAccessTokens, appIDsThisRound.Count));
@@ -399,6 +401,10 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC
using (HashSet<uint>.Enumerator enumerator = appIDsToRefresh.GetEnumerator()) {
while (true) {
if (!bot.IsConnectedAndLoggedOn) {
return;
}
while ((appIDsThisRound.Count < SharedInfo.AppInfosPerSingleRequest) && enumerator.MoveNext()) {
appIDsThisRound.Add(enumerator.Current);
}
@@ -407,10 +413,6 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC
break;
}
if (!bot.IsConnectedAndLoggedOn) {
return;
}
bot.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.BotRetrievingAppInfos, appIDsThisRound.Count));
AsyncJobMultiple<SteamApps.PICSProductInfoCallback>.ResultSet response;
@@ -420,7 +422,9 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC
} catch (Exception e) {
bot.ArchiLogger.LogGenericWarningException(e);
return;
appIDsThisRound.Clear();
continue;
}
if (response.Results == null) {
@@ -461,7 +465,7 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC
} catch (Exception e) {
bot.ArchiLogger.LogGenericWarningException(e);
return;
continue;
}
bot.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.BotFinishedRetrievingDepotKeys, depotTasks.Count));