Explorar o código

fixes #162 - Random MediaBrowser3 Crash

Luke Pulverenti %!s(int64=12) %!d(string=hai) anos
pai
achega
48d60b2f6a
Modificáronse 1 ficheiros con 11 adicións e 1 borrados
  1. 11 1
      MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs

+ 11 - 1
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);
         }
 
         /// <summary>