Avoid output when disabled

This commit is contained in:
icylogic
2015-08-11 10:56:12 +08:00
parent 0e4f0f17cd
commit b36b25af06
@@ -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
}