Browse Source

Merge pull request #473 from GangZhuo/master

Minor fixes
tags/3.2
Gang Zhuo 8 years ago
parent
commit
b01aced174
2 changed files with 13 additions and 3 deletions
  1. +6
    -1
      shadowsocks-csharp/Controller/Service/AvailabilityStatistics.cs
  2. +7
    -2
      shadowsocks-csharp/Controller/Service/PolipoRunner.cs

+ 6
- 1
shadowsocks-csharp/Controller/Service/AvailabilityStatistics.cs View File

@@ -196,7 +196,12 @@ namespace Shadowsocks.Controller
_inboundSpeedRecords.TryGetValue(id, out inboundSpeedRecords); _inboundSpeedRecords.TryGetValue(id, out inboundSpeedRecords);
_outboundSpeedRecords.TryGetValue(id, out outboundSpeedRecords); _outboundSpeedRecords.TryGetValue(id, out outboundSpeedRecords);
_latencyRecords.TryGetValue(id, out latencyRecords); _latencyRecords.TryGetValue(id, out latencyRecords);
records.Add(id, new StatisticsRecord(id, inboundSpeedRecords, outboundSpeedRecords, latencyRecords));
StatisticsRecord record = new StatisticsRecord(id, inboundSpeedRecords, outboundSpeedRecords, latencyRecords);
/* duplicate server identifier */
if (records.ContainsKey(id))
records[id] = record;
else
records.Add(id, record);
} }


if (Config.Ping) if (Config.Ping)


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

@@ -49,8 +49,13 @@ namespace Shadowsocks.Controller
{ {
try try
{ {
p.Kill();
p.WaitForExit();
p.CloseMainWindow();
p.WaitForExit(100);
if (!p.HasExited)
{
p.Kill();
p.WaitForExit();
}
} }
catch (Exception e) catch (Exception e)
{ {


Loading…
Cancel
Save