Skip to content

Commit 338b6e0

Browse files
authored
Merge pull request #12072 from benaadams/spelling
Fix spelling
2 parents 339290d + 3350505 commit 338b6e0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ private async ValueTask<FlushResult> ProcessDataWrites()
382382
{
383383
if (readResult.Buffer.Length != 0)
384384
{
385-
throw new Exception("Http2OutpuProducer.ProcessDataWrites() observed an unexpected state where the streams output ended with data still remaining in the pipe.");
385+
ThrowUnexpectedState();
386386
}
387387

388388
// Headers have already been written and there is no other content to write
@@ -402,12 +402,17 @@ private async ValueTask<FlushResult> ProcessDataWrites()
402402
}
403403
catch (Exception ex)
404404
{
405-
_log.LogCritical(ex, "Http2OutpuProducer.ProcessDataWrites() observed an unexpected exception.");
405+
_log.LogCritical(ex, nameof(Http2OutputProducer) + "." + nameof(ProcessDataWrites) + " observed an unexpected exception.");
406406
}
407407

408408
_dataPipe.Reader.Complete();
409409

410410
return flushResult;
411+
412+
static void ThrowUnexpectedState()
413+
{
414+
throw new InvalidOperationException(nameof(Http2OutputProducer) + "." + nameof(ProcessDataWrites) + " observed an unexpected state where the streams output ended with data still remaining in the pipe.");
415+
}
411416
}
412417

413418
private Memory<byte> GetFakeMemory(int sizeHint)

0 commit comments

Comments
 (0)