Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race in applying settings and acking #1626

Closed
dfawley opened this issue Oct 26, 2017 · 0 comments · Fixed by #1630
Closed

Race in applying settings and acking #1626

dfawley opened this issue Oct 26, 2017 · 0 comments · Fixed by #1630
Assignees

Comments

@dfawley
Copy link
Member

dfawley commented Oct 26, 2017

The way it works right now, we aren't applying any settings until right as we send the ack. This can result in a race:

  1. Server and client are in steady state with maximum streams = 5
  2. Client receives a settings frame with a limit of 1. It appends the ack to the control buffer in response.
  3. Client initiates 5 new streams and pushes their headers onto the control buffer, which it thinks is fine because the settings are not applied yet.
  4. Client applies settings and sends settings ack, promising not to initiate more than one stream.
  5. Client sends headers for 5 new streams.

We need to make sure settings are applied before queuing the ack message if the settings are more restrictive than they were before. On the other hand, we should queue the ack message and then apply the settings if they are more permissive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants