From 52b31fba1e947d7e7a3b98c0480ee9ea971e1719 Mon Sep 17 00:00:00 2001 From: CGQAQ Date: Tue, 27 Aug 2019 12:17:58 +0800 Subject: [PATCH] delete useless code due to remove auto reboot --- v2rayN/v2rayN/Program.cs | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/v2rayN/v2rayN/Program.cs b/v2rayN/v2rayN/Program.cs index b48c8110..da87a1c4 100644 --- a/v2rayN/v2rayN/Program.cs +++ b/v2rayN/v2rayN/Program.cs @@ -29,24 +29,6 @@ namespace v2rayN AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; - var args = Environment.GetCommandLineArgs(); - bool _isRestart = args.Length > 1 && args[1] == "/restart"; - if (_isRestart) - { - try - { - // get old process and wait UP TO 5 secs then give up! - int _restartProcessId = int.Parse(args[2]); - Process oldProcess = Process.GetProcessById(_restartProcessId); - oldProcess.WaitForExit(); - } - catch - { - // the process did not exist - probably already closed! - //TODO: --> LOG - } - } - Process instance = RunningInstance(); if (instance == null) { @@ -62,7 +44,7 @@ namespace v2rayN } else { - UI.Show($"v2rayN is already running(v2rayN已经运行){args[1]} {args[2]}"); + UI.Show($"v2rayN is already running(v2rayN已经运行)"); } }