Skip to content

Put in a smidge of elbow grease to reduce excess GREASE - #362

Merged
Ruben2424 merged 3 commits into
hyperium:masterfrom
arrimorris:arrimorris-GREASE-fix
Sep 19, 2026
Merged

Ruben2424 merged 3 commits into
hyperium:masterfrom
arrimorris:arrimorris-GREASE-fix

Conversation

@arrimorris

Copy link
Copy Markdown
Contributor

Currently, the send_grease_frame flag is only cleared inside Connection::accept(). However, third-party backends and embedders (like hyper) that require fine-grained async control use the i-implement-a-third-party-backend... feature to bypass accept() and drive the connection via poll_accept_request_stream_internal(). Since embedders bypass accept(), the send_grease_frame flag is never cleared. No bueno.

By moving this toggle down into create_resolver_internal, the GREASE frame is correctly sent once per connection, regardless of whether we call the high-level accept() or the low-level poll_accept_request_stream_internal() API.

arrimorris and others added 3 commits August 23, 2026 16:19
Currently, the send_grease_frame flag is only cleared inside Connection::accept(). However, third-party backends and embedders (like hyper) that require fine-grained async control use the i-implement-a-third-party-backend... feature to bypass accept() and drive the connection via poll_accept_request_stream_internal(). Since embedders bypass accept(), the send_grease_frame flag is never cleared. No bueno.

By moving this state toggle down into create_resolver_internal, the GREASE frame is correctly sent exactly once per connection, regardless of whether the user calls the high-level accept() or the low-level poll_accept... API.

@Ruben2424 Ruben2424 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@Ruben2424
Ruben2424 merged commit 2328b7e into hyperium:master Sep 19, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants