diff --git a/CHANGELOG.md b/CHANGELOG.md index ce78b8baae..81b0680a90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fixed `HttpConnection.ConvertHttpMethod` to support `Patch` method ([#489](https://github.com/opensearch-project/opensearch-net/pull/489)) - Fixed `IEnumerable` property mapping. ([#503](https://github.com/opensearch-project/opensearch-net/pull/503)) +- Fixed `ConnectionConfiguration.DefaultMemoryStreamFactory` actually used as default. ([#552](https://github.com/opensearch-project/opensearch-net/pull/552)) ### Dependencies - Bumps `Microsoft.CodeAnalysis.CSharp` from 4.2.0 to 4.6.0 diff --git a/src/OpenSearch.Net/Configuration/ConnectionConfiguration.cs b/src/OpenSearch.Net/Configuration/ConnectionConfiguration.cs index 9b9e13ca2c..956da2ecc5 100644 --- a/src/OpenSearch.Net/Configuration/ConnectionConfiguration.cs +++ b/src/OpenSearch.Net/Configuration/ConnectionConfiguration.cs @@ -192,9 +192,8 @@ public abstract class ConnectionConfiguration : IConnectionConfigurationValue private bool _sniffOnStartup; private bool _throwExceptions; private bool _transferEncodingChunked; - private IMemoryStreamFactory _memoryStreamFactory = RecyclableMemoryStreamFactory.Default; + private IMemoryStreamFactory _memoryStreamFactory = DefaultMemoryStreamFactory; private bool _enableTcpStats; - //public static IMemoryStreamFactory Default { get; } = RecyclableMemoryStreamFactory.Default; public static IMemoryStreamFactory DefaultMemoryStreamFactory { get; } = OpenSearch.Net.MemoryStreamFactory.Default; private bool _enableThreadPoolStats; @@ -615,7 +614,7 @@ public T SkipDeserializationForStatusCodes(params int[] statusCodes) => public T TransferEncodingChunked(bool transferEncodingChunked = true) => Assign(transferEncodingChunked, (a, v) => a._transferEncodingChunked = v); /// - /// The memory stream factory to use, defaults to + /// The memory stream factory to use, defaults to /// public T MemoryStreamFactory(IMemoryStreamFactory memoryStreamFactory) => Assign(memoryStreamFactory, (a, v) => a._memoryStreamFactory = v);