diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-06-02 23:16:39 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-06-02 23:16:39 -0400 |
| commit | 6f7d7e61b911518aadcd6dc0b061d0eafd8a7acf (patch) | |
| tree | 5b81a534a32212eb3350e162631eae1851a76fb4 /MediaBrowser.Server.Implementations/Connect | |
| parent | 92ce7c0fa84055dd90d33fe2fa5c1b78274047a8 (diff) | |
add logging to connect reporting
Diffstat (limited to 'MediaBrowser.Server.Implementations/Connect')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/Connect/ConnectManager.cs | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs b/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs index 52ec5c9b1..3e211d003 100644 --- a/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs +++ b/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs @@ -3,6 +3,7 @@ using MediaBrowser.Common.Net; using MediaBrowser.Controller.Connect; using MediaBrowser.Controller.Plugins; using MediaBrowser.Model.Logging; +using MediaBrowser.Model.Net; using System; using System.IO; using System.Net; @@ -59,9 +60,13 @@ namespace MediaBrowser.Server.Implementations.Connect } } } - catch + catch (HttpException) { } + catch (Exception ex) + { + _logger.ErrorException("Error getting connection info", ex); + } } private string CacheFilePath diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs index 2d39f760e..048287faa 100644 --- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs +++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs @@ -130,7 +130,7 @@ namespace MediaBrowser.Server.Implementations.Connect UpdateConnectInfo(); } - private async void UpdateConnectInfo() + private async Task UpdateConnectInfo() { await _operationLock.WaitAsync().ConfigureAwait(false); @@ -400,6 +400,10 @@ namespace MediaBrowser.Server.Implementations.Connect } if (string.IsNullOrWhiteSpace(ConnectServerId)) { + await UpdateConnectInfo().ConfigureAwait(false); + } + if (string.IsNullOrWhiteSpace(ConnectServerId)) + { throw new ArgumentNullException("ConnectServerId"); } @@ -493,6 +497,10 @@ namespace MediaBrowser.Server.Implementations.Connect } if (string.IsNullOrWhiteSpace(ConnectServerId)) { + await UpdateConnectInfo().ConfigureAwait(false); + } + if (string.IsNullOrWhiteSpace(ConnectServerId)) + { throw new ArgumentNullException("ConnectServerId"); } |
