mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Fix ExtendedTimeout
If user sets connection timeout to a very low value, such as 10, then even another 10 multiplier might not be enough, we use extended timeout only in very specific cases such as ASF update or ASF STM listing, and we must disregard user preference when dealing with those.
This commit is contained in:
@@ -46,7 +46,7 @@ public sealed class WebBrowser : IDisposable {
|
||||
|
||||
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
|
||||
|
||||
private const byte ExtendedTimeoutMultiplier = 10; // Defines multiplier of timeout for WebBrowsers dealing with huge data (ASF update)
|
||||
private const ushort ExtendedTimeout = 600; // Defines 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
|
||||
|
||||
[PublicAPI]
|
||||
@@ -103,7 +103,7 @@ public sealed class WebBrowser : IDisposable {
|
||||
#if !NETFRAMEWORK
|
||||
DefaultRequestVersion = HttpVersion.Version30,
|
||||
#endif
|
||||
Timeout = TimeSpan.FromSeconds(extendedTimeout ? ExtendedTimeoutMultiplier * connectionTimeout : connectionTimeout)
|
||||
Timeout = TimeSpan.FromSeconds(extendedTimeout ? ExtendedTimeout : connectionTimeout)
|
||||
};
|
||||
|
||||
// Most web services expect that UserAgent is set, so we declare it globally
|
||||
|
||||
Reference in New Issue
Block a user