Skip to content

Commit 16a6610

Browse files
author
ladeak
committed
AllowSynchronousContinuations
1 parent f71e440 commit 16a6610

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/CHttpServer/CHttpServer/Http2ResponseWriter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public Http2ResponseWriter(FrameWriter frameWriter, uint maxFrameSize)
2828
_maxFrameSize = (int)maxFrameSize;
2929
_buffer = [];
3030
_hpackEncoder = new DynamicHPackEncoder();
31-
_channel = Channel.CreateUnbounded<StreamWriteRequest>(new UnboundedChannelOptions() { SingleReader = true, AllowSynchronousContinuations = false });
31+
_channel = Channel.CreateUnbounded<StreamWriteRequest>(new UnboundedChannelOptions() { SingleReader = true, AllowSynchronousContinuations = true });
3232
_priorityChannel = Channel.CreateUnbounded<StreamWriteRequest>(new UnboundedChannelOptions() { SingleReader = true, AllowSynchronousContinuations = false });
3333
}
3434

@@ -198,6 +198,7 @@ private async ValueTask WriteHeadersAsync(Http2Stream h2Stream)
198198
if (flushingBuffer.Length <= currentMaxFrameSize)
199199
{
200200
_frameWriter.WriteHeader(h2Stream.StreamId, flushingBuffer, endHeaders: true, endStream: false);
201+
await _frameWriter.FlushAsync();
201202
return;
202203
}
203204
else

0 commit comments

Comments
 (0)