mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +00:00
delete useless code due to remove auto reboot
This commit is contained in:
parent
328c0be6e9
commit
52b31fba1e
1 changed files with 1 additions and 19 deletions
|
@ -29,24 +29,6 @@ namespace v2rayN
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
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();
|
Process instance = RunningInstance();
|
||||||
if (instance == null)
|
if (instance == null)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +44,7 @@ namespace v2rayN
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UI.Show($"v2rayN is already running(v2rayN已经运行){args[1]} {args[2]}");
|
UI.Show($"v2rayN is already running(v2rayN已经运行)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue