Skip to content

Commit d4ae6ed

Browse files
Obsolete Clients property on HttpConnection (#4801) (#4802)
Relates: #4673 This commit adds the Clients property back to HttpConnection ,for binary compatibility, with an ObsoleteAttribute applied to indicate that the property is no longer used. Co-authored-by: Russ Cam <russ.cam@elastic.co>
1 parent df124c2 commit d4ae6ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Elasticsearch.Net/Connection/HttpConnection.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ public class HttpConnection : IConnection
4646
+ $" please set {nameof(ConnectionConfiguration.ConnectionLimit)} to -1 on your connection configuration/settings."
4747
+ $" this will cause the {nameof(HttpClientHandler.MaxConnectionsPerServer)} not to be set on {nameof(HttpClientHandler)}";
4848

49-
private readonly object _lock = new object();
5049
private RequestDataHttpClientFactory HttpClientFactory { get; }
5150

51+
[Obsolete("HttpConnection now uses a HttpClientFactory implementation to manage HttpClient and HttpMessageHandler instances. "
52+
+ "This property is no longer used and will be removed in the next major release")]
53+
protected readonly ConcurrentDictionary<int, HttpClient> Clients = new ConcurrentDictionary<int, HttpClient>();
54+
5255
public int InUseHandlers => HttpClientFactory.InUseHandlers;
5356
public int RemovedHandlers => HttpClientFactory.RemovedHandlers;
5457

0 commit comments

Comments
 (0)