async private Task HandleClientInternal(TcpSocket Socket)
{
if (HandleClient != null)
{
if (CatchExceptions)
{
Exception YieldedException = null;
try
{
await HandleClient(Socket);
}
catch (IOException)
{
}
catch (Exception CatchedException)
{
YieldedException = CatchedException;
}
if (YieldedException != null)
{
await Console.Error.WriteLineAsync(String.Format("{0}", YieldedException));
}
}
else
{
await HandleClient(Socket);
}
}
}