Windows 0.3.6 runtime preflight and update download reliability source delta; connection fixes retained; no private history or other platform changes
This commit is contained in:
@@ -6,6 +6,9 @@ namespace UCVL.VPNPlus;
|
||||
internal static class ClientUpdater
|
||||
{
|
||||
private const long MaximumInstallerBytes = 200L * 1024 * 1024;
|
||||
// A 200 MiB package takes 1024 seconds on a slow 200 KiB/s link.
|
||||
// Keep a bounded transfer budget with headroom; idle reads still stop at 30s.
|
||||
internal static readonly TimeSpan DefaultTotalTimeout = TimeSpan.FromMinutes(20);
|
||||
|
||||
internal static bool IsNewerVersion(string candidate, string? current = null)
|
||||
{
|
||||
@@ -88,7 +91,7 @@ internal static class ClientUpdater
|
||||
// Bound the entire transfer and each body read independently; a stalled
|
||||
// download must not leave the update UI disabled indefinitely.
|
||||
using var deadline = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
|
||||
deadline.CancelAfter(totalTimeout ?? TimeSpan.FromMinutes(10));
|
||||
deadline.CancelAfter(totalTimeout ?? DefaultTotalTimeout);
|
||||
var idleLimit = idleTimeout ?? TimeSpan.FromSeconds(30);
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user