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:
@@ -38,14 +38,15 @@ internal sealed partial class MainForm
|
||||
|
||||
private async Task CheckUplinkAsync()
|
||||
{
|
||||
if (_preview || _uiOnly || _exiting || !_wantConnected || _busy || _uplinkChecking || _xray.IsTransitioning || !_xray.CanRebindNetwork) return;
|
||||
if (_runtimeRepairRequired || _preview || _uiOnly || _exiting || !_wantConnected || _busy || _uplinkChecking || _xray.IsTransitioning || !_xray.CanRebindNetwork) return;
|
||||
if (!PreflightClientRuntime(suppressDialogs: true)) return;
|
||||
_uplinkChecking = true;
|
||||
var refreshAuthorization = false;
|
||||
var operating = false;
|
||||
try
|
||||
{
|
||||
var reading = await Task.Run(() => PhysicalUplink.Read(_xray.BoundNetwork?.InterfaceIndex));
|
||||
if (_exiting || !_wantConnected || _busy || _xray.IsTransitioning) return;
|
||||
if (_runtimeRepairRequired || _exiting || !_wantConnected || _busy || _xray.IsTransitioning) return;
|
||||
if (!reading.Success) return;
|
||||
if (!_handover.Pending && PhysicalUplink.Fingerprint(reading.Network) == _xray.BoundNetworkFingerprint && reading.Network is not null)
|
||||
{
|
||||
@@ -61,7 +62,7 @@ internal sealed partial class MainForm
|
||||
_connectButton.Enabled = true;
|
||||
_connectButton.Text = "断开";
|
||||
var result = await _handover.ObserveAsync(reading, Environment.TickCount64, _handoverCancellation.Token);
|
||||
if (!_wantConnected || _exiting) return;
|
||||
if (_runtimeRepairRequired || !_wantConnected || _exiting) return;
|
||||
if (result == NetworkHandover.Result.Recovered)
|
||||
{
|
||||
if (_currentNodeUsesTailnet && !_xray.UsesTailnet)
|
||||
@@ -89,10 +90,11 @@ internal sealed partial class MainForm
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException) { }
|
||||
catch (ClientRuntimeException error) { HandleClientRuntimeFailure(error, suppressDialogs: true); }
|
||||
catch (Exception error)
|
||||
{
|
||||
AppPaths.WriteError(error);
|
||||
if (_wantConnected && !_exiting)
|
||||
if (!_runtimeRepairRequired && _wantConnected && !_exiting)
|
||||
{
|
||||
SetConnectionState(false, "等待网络恢复", "本地网络尚未就绪,将自动重试;可点击断开取消。");
|
||||
DisplayTraffic(null, null, "等待网络恢复");
|
||||
|
||||
Reference in New Issue
Block a user