Browse Source

catch exception when trying to kill polipo

tags/2.3
clowwindy 10 years ago
parent
commit
c76ffce3ab
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      shadowsocks-csharp/Controller/PolipoRunner.cs

+ 9
- 2
shadowsocks-csharp/Controller/PolipoRunner.cs View File

@@ -20,8 +20,15 @@ namespace Shadowsocks.Controller
Process[] existingPolipo = Process.GetProcessesByName("ss_polipo"); Process[] existingPolipo = Process.GetProcessesByName("ss_polipo");
foreach (Process p in existingPolipo) foreach (Process p in existingPolipo)
{ {
p.Kill();
p.WaitForExit();
try
{
p.Kill();
p.WaitForExit();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
} }
string temppath = Path.GetTempPath(); string temppath = Path.GetTempPath();
string polipoConfig = Resources.polipo_config; string polipoConfig = Resources.polipo_config;


Loading…
Cancel
Save