Skip to content

The Free Software Media System - Server Backend & API

Fix not found handling in connect server get

Eric Reede360f01f2655
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
index d92ca8323f..e87828173f 100644
--- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
+++ b/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;
}