refine logs

This commit is contained in:
clowwindy
2015-07-26 12:27:34 +08:00
parent ccec6be210
commit eda92b80e1
2 changed files with 6 additions and 1 deletions
@@ -83,6 +83,10 @@ namespace Shadowsocks.Controller
public void CreateRemote()
{
Server server = controller.GetAServer(IStrategyCallerType.TCP, (IPEndPoint)connection.RemoteEndPoint);
if (server == null || server.server == "")
{
throw new ArgumentException("No server configured");
}
this.encryptor = EncryptorFactory.GetEncryptor(server.method, server.password);
this.server = server;
}
@@ -310,6 +314,7 @@ namespace Shadowsocks.Controller
StartConnect();
}
catch (Exception e)
{
Logging.LogUsefulException(e);
@@ -154,7 +154,7 @@ namespace Shadowsocks.Controller
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
Logging.Debug(ex.ToString());
return;
}
}