瀏覽代碼

Fix not found handling in connect server get

Eric Reed 10 年之前
父節點
當前提交
e360f01f26
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      MediaBrowser.Server.Implementations/Connect/ConnectManager.cs

+ 3 - 1
MediaBrowser.Server.Implementations/Connect/ConnectManager.cs

@@ -133,7 +133,9 @@ namespace MediaBrowser.Server.Implementations.Connect
                     }
                     catch (HttpException ex)
                     {
-                        if (!ex.StatusCode.HasValue || ex.StatusCode.Value != HttpStatusCode.NotFound || ex.StatusCode.Value != HttpStatusCode.Unauthorized)
+                        var webEx = (WebException) ex.InnerException;
+
+                        if (webEx != null && webEx.Status != WebExceptionStatus.ProtocolError && ((HttpWebResponse)webEx.Response).StatusCode != HttpStatusCode.NotFound)
                         {
                             throw;
                         }