File tree 4 files changed +17
-2
lines changed
4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 2
2
<Import Project =" ..\Directory.Build.props" />
3
3
<PropertyGroup >
4
4
<StrongNameKeyId >Open</StrongNameKeyId >
5
- <ServicingVersion >1 </ServicingVersion >
5
+ <ServicingVersion >2 </ServicingVersion >
6
6
<!-- This should be pinned to 5.0.0.1 for non-netfx assets as it is part of aspnetcore ref pack.-->
7
7
<AssemblyVersion >5.0.0.1</AssemblyVersion >
8
8
</PropertyGroup >
Original file line number Diff line number Diff line change @@ -1011,7 +1011,7 @@ private void WriteMultiSegment(ReadOnlySpan<byte> source)
1011
1011
}
1012
1012
1013
1013
// We filled the segment
1014
- _writingHead . End += writable ;
1014
+ _writingHead . End += _writingHeadBytesBuffered ;
1015
1015
_writingHeadBytesBuffered = 0 ;
1016
1016
1017
1017
// This is optimized to use pooled memory. That's why we pass 0 instead of
Original file line number Diff line number Diff line change @@ -277,5 +277,19 @@ public async Task NullExaminedAndConsumedNoops()
277
277
ReadResult result = await _pipe . Reader . ReadAsync ( ) ;
278
278
_pipe . Reader . AdvanceTo ( default , default ) ;
279
279
}
280
+
281
+ [ Fact ]
282
+ public async Task AdvanceFollowedByWriteAsyncTest ( )
283
+ {
284
+ Memory < byte > buffer = new byte [ 26 ] ;
285
+ Pipe pipe = new ( new PipeOptions ( minimumSegmentSize : 1 ) ) ;
286
+
287
+ var mem = pipe . Writer . GetMemory ( 14 ) [ ..14 ] ;
288
+ buffer [ ..14 ] . CopyTo ( mem ) ;
289
+ pipe . Writer . Advance ( 14 ) ;
290
+ await pipe . Writer . WriteAsync ( buffer [ 14 ..] ) ;
291
+ ReadResult res = await pipe . Reader . ReadAsync ( ) ;
292
+ Assert . Equal ( res . Buffer . Length , buffer . Length ) ;
293
+ }
280
294
}
281
295
}
Original file line number Diff line number Diff line change 18
18
<ProjectReference Include =" $(PkgDir)*\*.proj" Exclude =" $(PkgDir)test\*" Condition =" '$(BuildAllOOBPackages)' == 'true'" />
19
19
<ProjectReference Include =" $(MSBuildThisFileDirectory)*\pkg\**\*.pkgproj" Condition =" ('$(BuildAllConfigurations)' == 'true' or '$(DotNetBuildFromSource)' == 'true') And '$(BuildAllOOBPackages)' == 'true'" />
20
20
<!-- If setting BuildAllOOBPackages to false, add bellow the individual OOB packages you want to continue to build -->
21
+ <ProjectReference Include =" $(MSBuildThisFileDirectory)System.IO.Pipelines\pkg\System.IO.Pipelines.pkgproj" Condition =" ('$(BuildAllConfigurations)' == 'true' or '$(DotNetBuildFromSource)' == 'true') And '$(BuildAllOOBPackages)' == 'true'" />
21
22
<!-- This is merge marker 1 to help automerge -->
22
23
<!-- This is merge marker 2 to help automerge -->
23
24
<!-- This is merge marker 3 to help automerge -->
You can’t perform that action at this time.
0 commit comments