Browse Source

clean up avoid log message on timeout and network cut off. it's useless but confuse users.

tags/3.0
kimw 9 years ago
parent
commit
84f14d71c9
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      shadowsocks-csharp/Controller/Logging.cs

+ 11
- 3
shadowsocks-csharp/Controller/Logging.cs View File

@@ -84,11 +84,19 @@ namespace Shadowsocks.Controller
}
else if (se.SocketErrorCode == SocketError.NotConnected)
{
// close when not connected
// The application tried to send or receive data, and the System.Net.Sockets.Socket is not connected.
}
else if (se.SocketErrorCode == SocketError.HostUnreachable)
{
// There is no network route to the specified host.
}
else if (se.SocketErrorCode == SocketError.TimedOut)
{
// The connection attempt timed out, or the connected host has failed to respond.
}
else
{
Console.WriteLine(e);
Info(e);
}
}
else if (e is ObjectDisposedException)
@@ -96,7 +104,7 @@ namespace Shadowsocks.Controller
}
else
{
Console.WriteLine(e);
Info(e);
}
}
}


Loading…
Cancel
Save