diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-07-23 02:12:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-23 02:12:16 -0400 |
| commit | 5ec9d4e9fe4b3e5109ca1abf6c1ffdb87fd2d4dd (patch) | |
| tree | e49cc827583b6dffeabb142af5fae889b1a09581 /Emby.Common.Implementations/HttpClientManager | |
| parent | e99bc61d53f393dc475e265e3b5bc8c19b186594 (diff) | |
| parent | 0d1b5ad733e6f1bbf6d730e723969495dda99016 (diff) | |
Merge pull request #2767 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Common.Implementations/HttpClientManager')
| -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; } |
