From 48d60b2f6ad2cf88bd5336025446b005d24fe4ee Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 18 Apr 2013 14:30:32 -0400 Subject: [PATCH] fixes #162 - Random MediaBrowser3 Crash --- .../HttpServer/HttpServer.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs index 527de6ae4a..4f93f4b6e4 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs @@ -296,7 +296,17 @@ namespace MediaBrowser.Server.Implementations.HttpServer RaiseReceiveWebRequest(context); - await Task.Run(() => ProcessRequest(context)).ConfigureAwait(false); + await Task.Run(() => + { + try + { + ProcessRequest(context); + } + catch (Exception ex) + { + _logger.ErrorException("ProcessRequest failure", ex); + } + }).ConfigureAwait(false); } ///