Revert "If the update fails during the upgrade, the update will be retried."

This reverts commit 9748fbb076.
This commit is contained in:
2dust
2025-03-04 17:02:05 +08:00
parent 8d1853e991
commit 6e5af34877
3 changed files with 87 additions and 113 deletions
+4 -17
View File
@@ -7,33 +7,20 @@ namespace AmazTool
{
if (args.Length == 0)
{
Utils.WriteLine(Resx.Resource.Guidelines);
Utils.Waiting(5);
Console.WriteLine(Resx.Resource.Guidelines);
Thread.Sleep(5000);
return;
}
var argData = Uri.UnescapeDataString(string.Join(" ", args));
if (argData.Equals("rebootas"))
{
Utils.Waiting(1);
Thread.Sleep(1000);
Utils.StartV2RayN();
return;
}
var tryTimes = 0;
UpgradeApp.Init();
while (tryTimes++ < 3)
{
if (!UpgradeApp.Upgrade(argData))
{
continue;
}
Utils.WriteLine(Resx.Resource.Restartv2rayN);
Utils.Waiting(3);
Utils.StartV2RayN();
break;
}
UpgradeApp.Upgrade(argData);
}
}
}