Suppress those pesky warnings

This commit is contained in:
White 2014-09-10 14:31:20 +09:30
parent 34b268f1db
commit 70a9fc04c5

View file

@ -206,23 +206,36 @@ namespace TShockAPI
}
catch (ObjectDisposedException e)
{
Log.Warn(e.ToString());
Log.Warn(e.ToString());
}
catch (SocketException e)
{
switch ((uint)e.ErrorCode)
{
case 0x80004005:
switch ((uint)e.ErrorCode)
{
case 0x80004005:
case 10053:
break;
default:
Log.Warn(e.ToString());
break;
}
break;
default:
Log.Warn(e.ToString());
break;
}
}
catch (IOException e)
{
Log.Warn(e.ToString());
if (e.InnerException is SocketException)
{
switch (((SocketException)e.InnerException).SocketErrorCode)
{
case SocketError.Shutdown:
case SocketError.ConnectionReset:
break;
default:
Log.Warn(e.ToString());
break;
}
}
else
Log.Warn(e.ToString());
}
return false;
}