Browse Source

refine logs

tags/2.5.1
clowwindy 9 years ago
parent
commit
eda92b80e1
2 changed files with 6 additions and 1 deletions
  1. +5
    -0
      shadowsocks-csharp/Controller/Service/TCPRelay.cs
  2. +1
    -1
      shadowsocks-csharp/Controller/Service/UpdateChecker.cs

+ 5
- 0
shadowsocks-csharp/Controller/Service/TCPRelay.cs View File

@@ -83,6 +83,10 @@ namespace Shadowsocks.Controller
public void CreateRemote() public void CreateRemote()
{ {
Server server = controller.GetAServer(IStrategyCallerType.TCP, (IPEndPoint)connection.RemoteEndPoint); 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.encryptor = EncryptorFactory.GetEncryptor(server.method, server.password);
this.server = server; this.server = server;
} }
@@ -310,6 +314,7 @@ namespace Shadowsocks.Controller
StartConnect(); StartConnect();
} }
catch (Exception e) catch (Exception e)
{ {
Logging.LogUsefulException(e); Logging.LogUsefulException(e);


+ 1
- 1
shadowsocks-csharp/Controller/Service/UpdateChecker.cs View File

@@ -154,7 +154,7 @@ namespace Shadowsocks.Controller
} }
catch (Exception ex) catch (Exception ex)
{ {
Console.WriteLine(ex.ToString());
Logging.Debug(ex.ToString());
return; return;
} }
} }


Loading…
Cancel
Save