This commit is contained in:
Łukasz Domeradzki
2025-05-02 13:23:59 +02:00
parent a19aadd826
commit cf5d7fd192
2 changed files with 16 additions and 16 deletions

View File

@@ -60,6 +60,10 @@ internal static class MobileAuthenticatorWebHandler {
{ "steamid", bot.SteamID }
};
using WebAPI.AsyncInterface twoFactorService = bot.SteamConfiguration.GetAsyncWebAPIInterface(TwoFactorService);
twoFactorService.Timeout = bot.ArchiWebHandler.WebBrowser.Timeout;
CTwoFactor_AddAuthenticator_Response? response = null;
for (byte i = 0; (i < WebBrowser.MaxTries) && (response == null); i++) {
@@ -67,10 +71,6 @@ internal static class MobileAuthenticatorWebHandler {
await Task.Delay(ArchiWebHandler.WebLimiterDelay).ConfigureAwait(false);
}
using WebAPI.AsyncInterface twoFactorService = bot.SteamConfiguration.GetAsyncWebAPIInterface(TwoFactorService);
twoFactorService.Timeout = bot.ArchiWebHandler.WebBrowser.Timeout;
try {
// TODO: Move to CallProtobufAsync<TResponse, TRequest> when we update to SK2 3.2.0+ <https://github.com/SteamRE/SteamKit/pull/1537>
response = await ArchiWebHandler.WebLimitRequest(
@@ -119,6 +119,10 @@ internal static class MobileAuthenticatorWebHandler {
{ "steamid", bot.SteamID }
};
using WebAPI.AsyncInterface twoFactorService = bot.SteamConfiguration.GetAsyncWebAPIInterface(TwoFactorService);
twoFactorService.Timeout = bot.ArchiWebHandler.WebBrowser.Timeout;
CTwoFactor_FinalizeAddAuthenticator_Response? response = null;
for (byte i = 0; (i < WebBrowser.MaxTries) && (response == null); i++) {
@@ -126,10 +130,6 @@ internal static class MobileAuthenticatorWebHandler {
await Task.Delay(ArchiWebHandler.WebLimiterDelay).ConfigureAwait(false);
}
using WebAPI.AsyncInterface twoFactorService = bot.SteamConfiguration.GetAsyncWebAPIInterface(TwoFactorService);
twoFactorService.Timeout = bot.ArchiWebHandler.WebBrowser.Timeout;
try {
// TODO: Move to CallProtobufAsync<TResponse, TRequest> when we update to SK2 3.2.0+ <https://github.com/SteamRE/SteamKit/pull/1537>
response = await ArchiWebHandler.WebLimitRequest(

View File

@@ -1597,6 +1597,10 @@ public sealed class ArchiWebHandler : IDisposable {
internal HttpClient GenerateDisposableHttpClient() => WebBrowser.GenerateDisposableHttpClient();
internal async Task<HashSet<uint>?> GetAppList() {
using WebAPI.AsyncInterface steamAppsService = Bot.SteamConfiguration.GetAsyncWebAPIInterface(SteamAppsService);
steamAppsService.Timeout = WebBrowser.Timeout;
KeyValue? response = null;
for (byte i = 0; (i < WebBrowser.MaxTries) && (response == null); i++) {
@@ -1604,10 +1608,6 @@ public sealed class ArchiWebHandler : IDisposable {
await Task.Delay(WebLimiterDelay).ConfigureAwait(false);
}
using WebAPI.AsyncInterface steamAppsService = Bot.SteamConfiguration.GetAsyncWebAPIInterface(SteamAppsService);
steamAppsService.Timeout = WebBrowser.Timeout;
try {
response = await WebLimitRequest(
WebAPI.DefaultBaseAddress,
@@ -1712,6 +1712,10 @@ public sealed class ArchiWebHandler : IDisposable {
arguments["trade_offer_access_token"] = tradeToken;
}
using WebAPI.AsyncInterface econService = Bot.SteamConfiguration.GetAsyncWebAPIInterface(EconService);
econService.Timeout = WebBrowser.Timeout;
KeyValue? response = null;
for (byte i = 0; (i < WebBrowser.MaxTries) && (response == null); i++) {
@@ -1719,10 +1723,6 @@ public sealed class ArchiWebHandler : IDisposable {
await Task.Delay(WebLimiterDelay).ConfigureAwait(false);
}
using WebAPI.AsyncInterface econService = Bot.SteamConfiguration.GetAsyncWebAPIInterface(EconService);
econService.Timeout = WebBrowser.Timeout;
try {
response = await WebLimitRequest(
WebAPI.DefaultBaseAddress,