Use correct examined (#11124)

Merging to unblock benchmarks quickly.
This commit is contained in:
Ben Adams 2019-06-12 18:44:27 +01:00 committed by Artak
parent bbff308d22
commit 396c54d874
1 changed files with 4 additions and 2 deletions

View File

@ -100,7 +100,10 @@ namespace PlatformBenchmarks
if (state == State.Headers)
{
var reader = new SequenceReader<byte>(buffer);
if (Parser.ParseHeaders(new ParsingAdapter(this), ref reader))
var success = Parser.ParseHeaders(new ParsingAdapter(this), ref reader);
consumed = reader.Position;
if (success)
{
examined = consumed;
state = State.Body;
@ -110,7 +113,6 @@ namespace PlatformBenchmarks
examined = buffer.End;
}
consumed = reader.Position;
buffer = buffer.Slice(consumed);
}