add connect timeout

This commit is contained in:
clowwindy
2015-07-25 17:40:08 +08:00
parent cb5fece8b3
commit 449df1022d
3 changed files with 71 additions and 16 deletions
@@ -75,8 +75,10 @@ namespace Shadowsocks.Controller.Strategy
public Server GetAServer(IStrategyCallerType type, System.Net.IPEndPoint localIPEndPoint)
{
// TODO don't choose new server too frequently
ChooseNewServer();
if (type == IStrategyCallerType.TCP)
{
ChooseNewServer();
}
return _currentServer;
}