Merge pull request #2847 from mark-monteiro/fix-build

Fix compilation error in HttpListenerHost
This commit is contained in:
Joshua M. Boniface 2020-04-12 21:35:43 -04:00 committed by GitHub
commit 4e9df69ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -517,28 +517,21 @@ namespace Emby.Server.Implementations.HttpServer
}
else
{
await ErrorHandler(new FileNotFoundException(), httpReq, false).ConfigureAwait(false);
await ErrorHandler(new FileNotFoundException(), httpReq, false, urlToLog).ConfigureAwait(false);
}
}
catch (Exception ex) when (ex is SocketException || ex is IOException || ex is OperationCanceledException)
{
await ErrorHandler(ex, httpReq, false).ConfigureAwait(false);
await ErrorHandler(ex, httpReq, false, urlToLog).ConfigureAwait(false);
}
catch (SecurityException ex)
{
await ErrorHandler(ex, httpReq, false).ConfigureAwait(false);
await ErrorHandler(ex, httpReq, false, urlToLog).ConfigureAwait(false);
}
catch (Exception ex)
{
var logException = !string.Equals(ex.GetType().Name, "SocketException", StringComparison.OrdinalIgnoreCase);
bool ignoreStackTrace =
ex is SocketException
|| ex is IOException
|| ex is OperationCanceledException
|| ex is SecurityException
|| ex is FileNotFoundException;
await ErrorHandler(ex, httpReq, !ignoreStackTrace, urlToLog).ConfigureAwait(false);
await ErrorHandler(ex, httpReq, logException, urlToLog).ConfigureAwait(false);
}
finally
{