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

Fixes #8678 - Jetty client receives GO_AWAY and continue to send traf… #8894

Merged

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Nov 14, 2022

…fic on same connection

  • Now upon receiving the GOAWAY, the connection is removed from the pool, so it cannot be used by new requests.
  • HTTP2Session.removeStream() now happens after notifying HEADERS and DATA events, although the Stream state change still happens before. This is necessary to avoid that a "close" event is notified before a "headers" or "data" event.

With these changes, the race window of a client acquiring a connection while the server is closing it is reduced, but it is impossible to close it completely.

Signed-off-by: Simone Bordet simone.bordet@gmail.com
(cherry picked from commit fbc23ac)

…fic on same connection

* Now upon receiving the GOAWAY, the connection is removed from the pool, so it cannot be used by new requests.
* HTTP2Session.removeStream() now happens _after_ notifying HEADERS and DATA events, although the Stream state change still happens before.
This is necessary to avoid that a "close" event is notified before a "headers" or "data" event.

With these changes, the race window of a client acquiring a connection while the server is closing it is reduced, but it is impossible to close it completely.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
(cherry picked from commit fbc23ac)
@sbordet sbordet added the Sponsored This issue affects a user with a commercial support agreement label Nov 14, 2022
@sbordet sbordet requested a review from lorban November 14, 2022 09:57
@lorban
Copy link
Contributor

lorban commented Nov 14, 2022

See #8891 for the 10.0.x equivalent.

Copy link
Contributor

@lorban lorban left a comment

Choose a reason for hiding this comment

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

LGTM

@sbordet sbordet merged commit 6124ab9 into jetty-9.4.x Nov 14, 2022
@sbordet sbordet deleted the fix/jetty-9.4-8678-http2-improve-connection-pooling branch November 14, 2022 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sponsored This issue affects a user with a commercial support agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants