Skip to content

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

Open
arrimorris wants to merge 1 commit into
hyperium:masterfrom
arrimorris:arrimorris-GREASE-fix
Open

Put in a smidge of elbow grease to reduce excess GREASE#362
arrimorris wants to merge 1 commit into
hyperium:masterfrom
arrimorris:arrimorris-GREASE-fix

Conversation

@arrimorris

Copy link
Copy Markdown

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.

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.
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.

1 participant