From b36b25af069dbfe800ac88f9fb47c1510d5499a2 Mon Sep 17 00:00:00 2001 From: icylogic Date: Tue, 11 Aug 2015 10:56:12 +0800 Subject: [PATCH] Avoid output when disabled --- .../Controller/Strategy/SimplyChooseByStatisticsStrategy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks-csharp/Controller/Strategy/SimplyChooseByStatisticsStrategy.cs b/shadowsocks-csharp/Controller/Strategy/SimplyChooseByStatisticsStrategy.cs index 9ca63576..21a26666 100644 --- a/shadowsocks-csharp/Controller/Strategy/SimplyChooseByStatisticsStrategy.cs +++ b/shadowsocks-csharp/Controller/Strategy/SimplyChooseByStatisticsStrategy.cs @@ -106,7 +106,6 @@ namespace Shadowsocks.Controller.Strategy ).Aggregate((result1, result2) => result1.score > result2.score ? result1 : result2); Logging.Debug(string.Format("best server {0}: {1}", bestResult.server.FriendlyName(), bestResult.score)); - Console.WriteLine("Switch to server by statistics: {0}", bestResult.server.FriendlyName()); _currentServer = bestResult.server; } catch (Exception e) @@ -127,6 +126,7 @@ namespace Shadowsocks.Controller.Strategy Server IStrategy.GetAServer(IStrategyCallerType type, IPEndPoint localIPEndPoint) { + Console.WriteLine("Switch to server by statistics: {0}", _currentServer.FriendlyName()); return _currentServer; //current server cached for CachedInterval }