File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
test/InMemory.FunctionalTests Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -538,7 +538,7 @@ private Memory<byte> GetChunkedMemory(int sizeHint)
538
538
}
539
539
540
540
var memoryMaxLength = _currentChunkMemory . Length - BeginChunkLengthMax - EndChunkLength ;
541
- if ( _advancedBytesForChunk >= memoryMaxLength - sizeHint )
541
+ if ( _advancedBytesForChunk >= memoryMaxLength - sizeHint && _advancedBytesForChunk > 0 )
542
542
{
543
543
// Chunk is completely written, commit it to the pipe so GetMemory will return a new chunk of memory.
544
544
var writer = new BufferWriter < PipeWriter > ( _pipeWriter ) ;
Original file line number Diff line number Diff line change @@ -920,7 +920,7 @@ public async Task GetMemoryWithSizeHintWithoutStartAsync()
920
920
Assert . Equal ( 4096 , memory . Length ) ;
921
921
922
922
memory = response . BodyWriter . GetMemory ( 1000000 ) ;
923
- Assert . Equal ( 4096 , memory . Length ) ;
923
+ Assert . Equal ( 1000000 , memory . Length ) ;
924
924
await Task . CompletedTask ;
925
925
} , testContext ) )
926
926
{
You can’t perform that action at this time.
0 commit comments