diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-07-22 19:02:23 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-22 19:02:23 -0400 |
| commit | 7ffaf5e0776c49d0d9e39282e86037fb12d712df (patch) | |
| tree | 0979f67acfabb429571589e0120694993a20d369 /Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs | |
| parent | f559543bd221751ffba6fa5b17ae753778257988 (diff) | |
| parent | 4aaf3499bddd00f7f6179a97bd08d669963597e4 (diff) | |
Merge pull request #2765 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs')
| -rw-r--r-- | Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs index 5bd18cb80..700d04c4d 100644 --- a/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -736,10 +736,10 @@ namespace Emby.Common.Implementations.HttpClientManager { if (options.LogErrors) { - _logger.ErrorException("Error getting response from " + options.Url, ex); + _logger.ErrorException("Error " + webException.Status + " getting response from " + options.Url, webException); } - var exception = new HttpException(ex.Message, ex); + var exception = new HttpException(webException.Message, webException); var response = webException.Response as HttpWebResponse; if (response != null) @@ -752,6 +752,15 @@ namespace Emby.Common.Implementations.HttpClientManager } } + if (!exception.StatusCode.HasValue) + { + if (webException.Status == WebExceptionStatus.NameResolutionFailure || + webException.Status == WebExceptionStatus.ConnectFailure) + { + exception.IsTimedOut = true; + } + } + return exception; } |
