Skip to content

Commit 02a13ce

Browse files
committed
Add logging to KillProcess
#6386
1 parent 7884853 commit 02a13ce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

v2rayN/ServiceLib/Handler/CoreHandler.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,10 @@ private bool IsNeedSudo(ECoreType eCoreType)
327327
{
328328
return null;
329329
}
330-
try { proc?.Kill(true); } catch { }
331-
try { proc?.Close(); } catch { }
332-
try { proc?.Dispose(); } catch { }
330+
try { proc?.Kill(true); } catch (Exception ex) { Logging.SaveLog(ex.Message, ex); }
331+
try { proc?.Kill(); } catch (Exception ex) { Logging.SaveLog(ex.Message, ex); }
332+
try { proc?.Close(); } catch (Exception ex) { Logging.SaveLog(ex.Message, ex); }
333+
try { proc?.Dispose(); } catch (Exception ex) { Logging.SaveLog(ex.Message, ex); }
333334

334335
await Task.Delay(100);
335336
return null;

0 commit comments

Comments
 (0)