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.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
index 048287faa..4569503c0 100644
--- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
+++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
@@ -376,6 +376,11 @@ namespace MediaBrowser.Server.Implementations.Connect
public async Task<UserLinkResult> LinkUser(string userId, string connectUsername)
{
+ if (string.IsNullOrWhiteSpace(ConnectServerId))
+ {
+ await UpdateConnectInfo().ConfigureAwait(false);
+ }
+
await _operationLock.WaitAsync().ConfigureAwait(false);
try
@@ -400,10 +405,6 @@ namespace MediaBrowser.Server.Implementations.Connect
}
if (string.IsNullOrWhiteSpace(ConnectServerId))
{
- await UpdateConnectInfo().ConfigureAwait(false);
- }
- if (string.IsNullOrWhiteSpace(ConnectServerId))
- {
throw new ArgumentNullException("ConnectServerId");
}
@@ -474,6 +475,11 @@ namespace MediaBrowser.Server.Implementations.Connect
public async Task<UserLinkResult> InviteUser(ConnectAuthorizationRequest request)
{
+ if (string.IsNullOrWhiteSpace(ConnectServerId))
+ {
+ await UpdateConnectInfo().ConfigureAwait(false);
+ }
+
await _operationLock.WaitAsync().ConfigureAwait(false);
try
@@ -497,10 +503,6 @@ namespace MediaBrowser.Server.Implementations.Connect
}
if (string.IsNullOrWhiteSpace(ConnectServerId))
{
- await UpdateConnectInfo().ConfigureAwait(false);
- }
- if (string.IsNullOrWhiteSpace(ConnectServerId))
- {
throw new ArgumentNullException("ConnectServerId");
}