fix a crash

This commit is contained in:
clowwindy
2015-07-25 19:05:37 +08:00
parent 008e3544f2
commit dafe33f7ed
4 changed files with 40 additions and 8 deletions
@@ -6,6 +6,7 @@ using System.Text;
using System.Threading;
using System.Net.Sockets;
using Shadowsocks.Controller.Strategy;
using System.Net;
namespace Shadowsocks.Controller
{
@@ -101,6 +102,16 @@ namespace Shadowsocks.Controller
return null;
}
public Server GetAServer(IStrategyCallerType type, IPEndPoint localIPEndPoint)
{
IStrategy strategy = GetCurrentStrategy();
if (strategy != null)
{
return strategy.GetAServer(type, localIPEndPoint);
}
return GetCurrentServer();
}
public void SaveServers(List<Server> servers, int localPort)
{
_config.configs = servers;