aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Connect
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-10 22:28:34 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-10 22:28:34 -0500
commit5d4fec778c9653e02505f119e6824ace47677d06 (patch)
tree54b56253e0318848cad73c6be2de33e35d71c7b4 /MediaBrowser.Server.Implementations/Connect
parentf1a715b836ba33dab4c72d08acc316159de5dfa0 (diff)
sync updates
Diffstat (limited to 'MediaBrowser.Server.Implementations/Connect')
-rw-r--r--MediaBrowser.Server.Implementations/Connect/ConnectManager.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
index e079aaf61..52c21af68 100644
--- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
+++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
@@ -219,7 +219,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("wanApiAddress");
}
-
+
var url = "Servers";
url = GetConnectUrl(url);
@@ -699,7 +699,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("ConnectAccessKey");
}
-
+
options.RequestHeaders.Add("X-Connect-Token", ConnectAccessKey);
}
@@ -723,7 +723,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("ConnectServerId");
}
-
+
var url = GetConnectUrl("ServerAuthorizations");
url += "?serverId=" + ConnectServerId;
@@ -956,6 +956,10 @@ namespace MediaBrowser.Server.Implementations.Connect
_data.LastAuthorizationsRefresh = DateTime.UtcNow;
CacheData();
}
+ catch (Exception ex)
+ {
+ _logger.ErrorException("Error refreshing authorization", ex);
+ }
finally
{
_operationLock.Release();
@@ -1010,7 +1014,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("ConnectServerId");
}
-
+
var url = GetConnectUrl("ServerAuthorizations");
var options = new HttpRequestOptions
@@ -1074,7 +1078,7 @@ namespace MediaBrowser.Server.Implementations.Connect
});
SetApplicationHeader(options);
-
+
// No need to examine the response
using (var response = (await _httpClient.SendAsync(options, "POST").ConfigureAwait(false)).Content)
{
@@ -1094,7 +1098,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("user");
}
-
+
if (string.IsNullOrEmpty(user.ConnectUserId))
{
return;