From 5c5d7d034b0943d00c9f92085368e7a372462212 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 3 Jun 2015 11:26:39 -0400 Subject: add more sync indicators --- .../Connect/ConnectManager.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Server.Implementations') diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs index 048287faa4..4569503c01 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 LinkUser(string userId, string connectUsername) { + if (string.IsNullOrWhiteSpace(ConnectServerId)) + { + await UpdateConnectInfo().ConfigureAwait(false); + } + await _operationLock.WaitAsync().ConfigureAwait(false); try @@ -399,10 +404,6 @@ namespace MediaBrowser.Server.Implementations.Connect throw new ArgumentNullException("connectUsername"); } 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 InviteUser(ConnectAuthorizationRequest request) { + if (string.IsNullOrWhiteSpace(ConnectServerId)) + { + await UpdateConnectInfo().ConfigureAwait(false); + } + await _operationLock.WaitAsync().ConfigureAwait(false); try @@ -496,10 +502,6 @@ namespace MediaBrowser.Server.Implementations.Connect throw new ArgumentNullException("connectUsername"); } if (string.IsNullOrWhiteSpace(ConnectServerId)) - { - await UpdateConnectInfo().ConfigureAwait(false); - } - if (string.IsNullOrWhiteSpace(ConnectServerId)) { throw new ArgumentNullException("ConnectServerId"); } -- cgit v1.2.3