Skip to content

Commit 2126bd8

Browse files
committed
Use MaxBufferSize from custom memory pool
1 parent b0fd4e0 commit 2126bd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/StreamPipeReaderOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public StreamPipeReaderOptions(MemoryPool<byte>? pool = null, int bufferSize = -
5858

5959
/// <summary>Gets the maximum buffer size to use when renting memory from the <see cref="System.IO.Pipelines.StreamPipeReaderOptions.Pool" />.</summary>
6060
/// <value>The maximum buffer size.</value>
61-
internal int MaxBufferSize { get; } = DefaultMaxBufferSize;
61+
internal int MaxBufferSize => !IsDefaultSharedMemoryPool ? Pool.MaxBufferSize : DefaultMaxBufferSize;
6262

6363
/// <summary>Gets the threshold of remaining bytes in the buffer before a new buffer is allocated.</summary>
6464
/// <value>The minimum read size.</value>

0 commit comments

Comments
 (0)