aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Connect/ConnectManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Connect/ConnectManager.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
index 0f2d2e3d5..6479b6f9d 100644
--- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
+++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
@@ -133,9 +133,8 @@ namespace MediaBrowser.Server.Implementations.Connect
}
catch (HttpException ex)
{
- var webEx = (WebException) ex.InnerException;
-
- if (webEx == null || (webEx.Status != WebExceptionStatus.ProtocolError && ((HttpWebResponse)webEx.Response).StatusCode != HttpStatusCode.NotFound))
+ if (!ex.StatusCode.HasValue || ex.StatusCode.Value != HttpStatusCode.NotFound ||
+ ex.StatusCode.Value != HttpStatusCode.Unauthorized)
{
throw;
}