Skip to content

Conversation

@jkotalik
Copy link
Contributor

@jkotalik jkotalik commented Oct 6, 2020

Right now, if you CTRL+C when a connection is still active in HTTP/3, the connection will not gracefully shutdown. This is because we never have anything that interrupts the loop accepting new streams for a connection.

This change adds a CTS which is canceled in abort and StopProcessingNextRequest, which causes the Accept loop to exit.

This change also tries to centralize access to the stream dictionary, which ends/aborts all streams. Instead of aborting all streams inside of the InnerAbort, we check state in the finally block of the accept loop. Things are locked, so it should be all fine and dandy.

@ghost ghost added the area-servers label Oct 6, 2020
@jkotalik jkotalik closed this Oct 7, 2020
@jkotalik jkotalik reopened this Oct 7, 2020
@jkotalik jkotalik requested a review from JamesNK October 8, 2020 16:15
@jkotalik
Copy link
Contributor Author

jkotalik commented Oct 8, 2020

@JamesNK this has the settings commit in it as well, as an FYI.

@JamesNK
Copy link
Member

JamesNK commented Oct 8, 2020

Add a unit test/functional test of stopping a HTTP/3 connection?

@jkotalik
Copy link
Contributor Author

Found a small thing I want to resolve from runtime before merging dotnet/runtime#44885

@Tratcher Tratcher removed their request for review December 8, 2020 01:07
@jkotalik jkotalik force-pushed the jkotalik/funWithHttp3 branch from 59d31eb to 5cc3855 Compare December 11, 2020 18:32
@jkotalik jkotalik requested a review from a team December 18, 2020 00:50
Copy link
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to get this in so we can add unit tests in other PRs

{
Assert.True(buffer.Length > 0);

if (Http3FrameReader.TryReadFrame(ref buffer, frame, maxFrameSize, out var framePayload))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked in Http3FrameReader to see what it did with maxFrameSize, and it looks unused. Is there a maximum frame size in HTTP/3?

The reason I started looking into this is to see how header continuation frames were handled, but they don't seem to be a thing in HTTP/3.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is a maximum frame size in HTTP/3, but a peer may enforce one for headers via a HTTP/3 setting: https://quicwg.org/base-drafts/draft-ietf-quic-http.html#section-4.1.1.3.

So I think maxFrameSize should somehow only apply to headers.

@jkotalik jkotalik force-pushed the jkotalik/funWithHttp3 branch from df2af5f to d0b725f Compare January 4, 2021 23:51
@jkotalik
Copy link
Contributor Author

jkotalik commented Jan 4, 2021

Filed #29034 as a follow up

@jkotalik jkotalik merged commit 1172501 into master Jan 5, 2021
@jkotalik jkotalik deleted the jkotalik/funWithHttp3 branch January 5, 2021 01:28
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants