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 traffic on same connection #8891

Merged

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Nov 12, 2022

  • 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 [email protected]

…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 <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
@joakime joakime changed the title Fixes #8678 - Jetty client receives GO_AWAY and continue to send traf… Fixes #8678 - Jetty client receives GO_AWAY and continue to send traffic on same connection Nov 12, 2022
Signed-off-by: Simone Bordet <[email protected]>
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

@lorban
Copy link
Contributor

lorban commented Nov 14, 2022

See #8894 for the 9.4.x equivalent.

@sbordet sbordet merged commit df265e0 into jetty-10.0.x Nov 14, 2022
@sbordet sbordet deleted the fix/jetty-10-8678-http2-improve-connection-pooling branch November 14, 2022 14:25
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
2 participants