diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-06-03 11:26:39 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-06-03 11:26:39 -0400 |
| commit | 5c5d7d034b0943d00c9f92085368e7a372462212 (patch) | |
| tree | 29d74dbce2085234a4f834b109a2e59872c80c51 /MediaBrowser.Server.Implementations/Connect/ConnectManager.cs | |
| parent | 2771dd62891813c481c95ce662dd4b4678151689 (diff) | |
add more sync indicators
Diffstat (limited to 'MediaBrowser.Server.Implementations/Connect/ConnectManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Connect/ConnectManager.cs | 18 |
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"); } |
