Skip to content

Commit

Permalink
Revert httpclient as it fails as you are modifying it.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno committed May 28, 2019
1 parent 97a78e6 commit 0a97103
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/MonkeyCache/HttpCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public class HttpCache
{
}

internal static HttpClient client;

internal HttpClient CreateClient(TimeSpan timeout)
{
var h = new HttpClientHandler {
Expand All @@ -33,17 +31,11 @@ internal HttpClient CreateClient(TimeSpan timeout)
MaxAutomaticRedirections = 20,

};
if(client == null)
{
client = new HttpClient(h)
{
Timeout = timeout
};
}
else

var client = new HttpClient(h)
{
client.Timeout = timeout;
}
Timeout = timeout
};

return client;
}
Expand Down

0 comments on commit 0a97103

Please sign in to comment.