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:
2026-11-06 15:28:10 +00:00
parent 23a87387b8
commit ac40dd3a6c
18 changed files with 599 additions and 58 deletions
+4 -1
View File
@@ -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
{