From beac891eb69fe30c7b5ec570ec3a2819fbebedf5 Mon Sep 17 00:00:00 2001 From: tqk2811 Date: Mon, 24 Mar 2025 17:56:39 +0700 Subject: [PATCH] fix create RpcClient with param HttpClient not set BaseAddress --- src/Solnet.Rpc/Core/Http/JsonRpcClient.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Solnet.Rpc/Core/Http/JsonRpcClient.cs b/src/Solnet.Rpc/Core/Http/JsonRpcClient.cs index 41327779..a1a27d4a 100644 --- a/src/Solnet.Rpc/Core/Http/JsonRpcClient.cs +++ b/src/Solnet.Rpc/Core/Http/JsonRpcClient.cs @@ -52,7 +52,8 @@ protected JsonRpcClient(string url, ILogger logger = default, HttpClient httpCli { _logger = logger; NodeAddress = new Uri(url); - _httpClient = httpClient ?? new HttpClient { BaseAddress = NodeAddress }; + _httpClient = httpClient ?? new HttpClient(); + _httpClient.BaseAddress = NodeAddress; _rateLimiter = rateLimiter; _serializerOptions = new JsonSerializerOptions {