diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-01 23:17:10 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-01 23:17:10 -0400 |
| commit | 7736c8cefc3093d1edcd056f5e89fdb1cdca926f (patch) | |
| tree | 85b64b9c0caef664e8236a8637f32089e5686879 /MediaBrowser.Common.Implementations/HttpClientManager | |
| parent | 5b280de5196a382b3651c7073cf5e76ae7e6e761 (diff) | |
display program data path and bookmark in the dashboard
Diffstat (limited to 'MediaBrowser.Common.Implementations/HttpClientManager')
| -rw-r--r-- | MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs index 6c673d206..ca18442a8 100644 --- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -131,6 +131,16 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager await options.ResourcePool.WaitAsync(options.CancellationToken).ConfigureAwait(false); } + if ((DateTime.UtcNow - client.LastTimeout).TotalSeconds < 30) + { + if (options.ResourcePool != null) + { + options.ResourcePool.Release(); + } + + throw new HttpException(string.Format("Connection to {0} timed out", options.Url)) { IsTimedOut = true }; + } + _logger.Info("HttpClientManager.Get url: {0}", options.Url); try |
