Skip to content

Fixes #15368 - Fix incorrect eager aborting of H2 channels during graceful shutdown. - #15879

Merged
sbordet merged 1 commit into
jetty-12.1.xfrom
fix/12.1.x/15435-h2-graceful-shutdown-2
Sep 29, 2026
Merged

sbordet merged 1 commit into
jetty-12.1.xfrom
fix/12.1.x/15435-h2-graceful-shutdown-2

Conversation

@sbordet

@sbordet sbordet commented Sep 29, 2026

Copy link
Copy Markdown
Contributor
  • The HTTP/2 low layer is notifying that it is about to close the connection when all the HTTP/2 streams are closed via the "zero-streams-action".
  • On the client, this resulted in calling HttpConnectionOverHTTP2.close() which was aborting all the pending channels.
  • Aborting the channels in this case is too harsh, because we know that the corresponding stream is closed. Therefore, the corresponding channel has been notified of either all the data, or of a failure. We just need to remove and destroy the HttpConnectionOverHTTP2, and applications that need to read the last data or the failure from the channels would be able to do so without interacting with either the HttpConnectionOverHTTP2 or the HTTP/2 lower layer.

…ceful shutdown.

* The HTTP/2 low layer is notifying that it is about to close the connection when all the HTTP/2 streams are closed via the "zero-streams-action".
* On the client, this resulted in calling HttpConnectionOverHTTP2.close() which was aborting all the pending channels.
* Aborting the channels in this case is too harsh, because we know that the corresponding stream is closed.
  Therefore, the corresponding channel has been notified of either all the data, or of a failure.
 We just need to remove and destroy the HttpConnectionOverHTTP2, and applications that need to read the last data or the failure from the channels would be able to do so without interacting with either the HttpConnectionOverHTTP2 or the HTTP/2 lower layer.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet
sbordet merged commit 1f25119 into jetty-12.1.x Sep 29, 2026
11 checks passed
@sbordet
sbordet deleted the fix/12.1.x/15435-h2-graceful-shutdown-2 branch September 29, 2026 21:48
@lorban
lorban restored the fix/12.1.x/15435-h2-graceful-shutdown-2 branch September 30, 2026 07:01
@lorban
lorban deleted the fix/12.1.x/15435-h2-graceful-shutdown-2 branch September 30, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug For general bugs on Jetty side

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

HTTP/2 client aborts exchange and loses response completed during server graceful shutdown (regression in 12.1.10 / 12.0.36 from #15134 / #14692)

2 participants