Skip to content

Commit 0032a3d

Browse files
committed
Fix kill process for linux
1 parent c6d347d commit 0032a3d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

v2rayN/ServiceLib/Handler/CoreHandler.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ public async Task CoreStop()
155155
{
156156
try
157157
{
158+
if (_linuxSudoPid > 0)
159+
{
160+
await KillProcessAsLinuxSudo();
161+
_linuxSudoPid = -1;
162+
}
163+
158164
if (_process != null)
159165
{
160166
await ProcUtils.ProcessKill(_process, true);
@@ -166,12 +172,6 @@ public async Task CoreStop()
166172
await ProcUtils.ProcessKill(_processPre, true);
167173
_processPre = null;
168174
}
169-
170-
if (_linuxSudoPid > 0)
171-
{
172-
await KillProcessAsLinuxSudo();
173-
}
174-
_linuxSudoPid = -1;
175175
}
176176
catch (Exception ex)
177177
{
@@ -390,7 +390,7 @@ private async Task<string> CreateLinuxShellFile(string cmdLine, string fileName)
390390

391391
await File.WriteAllTextAsync(shFilePath, sb.ToString());
392392
await Utils.SetLinuxChmod(shFilePath);
393-
Logging.SaveLog(shFilePath);
393+
//Logging.SaveLog(shFilePath);
394394

395395
return shFilePath;
396396
}

0 commit comments

Comments
 (0)