diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-16 00:46:41 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-16 00:46:41 -0400 |
| commit | a8e5aba6432104b63c8b831b3239091ba94ada3c (patch) | |
| tree | 78d76473954e5974835baccad1a5ed83fddee447 /MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs | |
| parent | 2c5ee7e2cf45b6d70c2c64dfe2372d420aa3aa14 (diff) | |
update library setup
Diffstat (limited to 'MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs index c54c0a873..f4d4826eb 100644 --- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -283,8 +283,7 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager var url = options.Url; var urlHash = url.ToLower().GetMD5().ToString("N"); - var semaphore = GetLock(url); - + var responseCachePath = Path.Combine(_appPaths.CachePath, "httpclient", urlHash); response = await GetCachedResponse(responseCachePath, options.CacheLength, url).ConfigureAwait(false); @@ -293,6 +292,8 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager return response; } + var semaphore = GetLock(url); + await semaphore.WaitAsync(options.CancellationToken).ConfigureAwait(false); try |
