diff options
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 0e1f5a551..83885ee2e 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -228,11 +228,14 @@ namespace Emby.Server.Implementations.HttpServer } } - private void ErrorHandler(Exception ex, IRequest httpReq) + private void ErrorHandler(Exception ex, IRequest httpReq, bool logException = true) { try { - _logger.ErrorException("Error processing request", ex); + if (logException) + { + _logger.ErrorException("Error processing request", ex); + } var httpRes = httpReq.Response; @@ -529,6 +532,10 @@ namespace Emby.Server.Implementations.HttpServer ErrorHandler(new FileNotFoundException(), httpReq); } } + catch (OperationCanceledException ex) + { + ErrorHandler(ex, httpReq, false); + } catch (Exception ex) { ErrorHandler(ex, httpReq); |
