Skip to content

Commit

Permalink
Update RequestFactory.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Nov 19, 2024
1 parent b5f051b commit 12c9f27
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CryptoExchange.Net/Requests/RequestFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ namespace CryptoExchange.Net.Requests
/// </summary>
public class RequestFactory : IRequestFactory
{
private static HttpClient? _httpClient;
private HttpClient? _httpClient;

/// <inheritdoc />
public void Configure(ApiProxy? proxy, TimeSpan requestTimeout, HttpClient? client = null)
{
if (client == null && _httpClient == null)
if (client == null)
{
var handler = new HttpClientHandler();
try
Expand All @@ -40,8 +40,7 @@ public void Configure(ApiProxy? proxy, TimeSpan requestTimeout, HttpClient? clie
};
}

if (_httpClient == null)
_httpClient = client;
_httpClient = client;
}

/// <inheritdoc />
Expand Down

0 comments on commit 12c9f27

Please sign in to comment.