Skip to content

[HTTP/3] Loopback server should handle graceful shutdown properly #55025

@geoffkizer

Description

@geoffkizer

Currently, the HTTP3 loopback server used in tests is sending a GOAWAY frame but never closing the connection. This seems to lead to occasional races with the client in tests that issue multiple requests with the server closing the connection between requests. Some cookie tests are an example of this.

To function correctly per the RFC and to prevent these races, the HTTP3 loopback server needs to do the following:

(1) Send GOAWAY (it's doing this already)
(2) Accept any incoming streams and abort them with the H3_REQUEST_REJECTED
(3) When the client closes the connection, the AcceptStream operation from (2) will return null, indicating the connection has been closed. At this point the server can close its connection.

See https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-connection-shutdown

Note: I'm not sure the client is handling graceful shutdown properly itself; we may need to fix this as well in order to get this all to work.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions