This commit is contained in:
JustArchi
2019-07-05 11:39:19 +02:00
parent f2089118cf
commit d70e71dd68
4 changed files with 56 additions and 48 deletions

View File

@@ -34,15 +34,18 @@ using Newtonsoft.Json;
namespace ArchiSteamFarm {
public sealed class WebBrowser : IDisposable {
[PublicAPI]
public const byte MaxTries = 5; // Defines maximum number of recommended tries for a single request
internal const byte MaxConnections = 5; // Defines maximum number of connections per ServicePoint. Be careful, as it also defines maximum number of sockets in CLOSE_WAIT state
internal const byte MaxTries = 5; // Defines maximum number of recommended tries for a single request
private const byte ExtendedTimeoutMultiplier = 10; // Defines multiplier of timeout for WebBrowsers dealing with huge data (ASF update)
private const byte MaxIdleTime = 15; // Defines in seconds, how long socket is allowed to stay in CLOSE_WAIT state after there are no connections to it
internal readonly CookieContainer CookieContainer = new CookieContainer();
[PublicAPI]
public TimeSpan Timeout => HttpClient.Timeout;
internal TimeSpan Timeout => HttpClient.Timeout;
internal readonly CookieContainer CookieContainer = new CookieContainer();
private readonly ArchiLogger ArchiLogger;
private readonly HttpClient HttpClient;
@@ -593,9 +596,11 @@ namespace ArchiSteamFarm {
case "https":
break;
case "steammobile":
// Those redirections are invalid, but we're aware of that and we have extra logic for them
return response;
default:
// We have no clue about those, but maybe HttpClient can handle them for us
ASF.ArchiLogger.LogGenericError(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(redirectUri.Scheme), redirectUri.Scheme));