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 #10145 - WritePendingException over HTTP/2 tunnel #10146

Merged

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Jul 25, 2023

Method HTTP2StreamEndPoint.flush() has a "no pending operation" semantic, but the previous implementation was calling stream.data(), which may become a pending operation if the stream is congested.

Changed the implementation of flush() to return false in the IDLE and PENDING cases. Now every flush() is converted to a write(), which has the same semantic as stream.data().

Method HTTP2StreamEndPoint.flush() has a "no pending operation" semantic, but the previous implementation was calling stream.data(), which may become a pending operation if the stream is congested.

Changed the implementation of flush() to return false in the IDLE and PENDING cases.
Now every flush() is converted to a write(), which has the same semantic as stream.data().

Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet linked an issue Jul 25, 2023 that may be closed by this pull request
@sbordet sbordet requested review from lorban and gregw July 25, 2023 15:53
Signed-off-by: Simone Bordet <[email protected]>
lorban
lorban previously approved these changes Jul 26, 2023
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

If the return false for IDLE is correct, perhaps a comment saying why, as there is currently no true return from the flush method.

@joakime joakime added the Bug For general bugs on Jetty side label Jul 26, 2023
@sbordet sbordet requested a review from gregw July 26, 2023 14:15
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

At the very least this needs javadoc explaining why this method doesn't flush any data?

Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet merged commit a5a0a6c into jetty-10.0.x Jul 26, 2023
@sbordet sbordet deleted the fix/jetty-10-10145-writependingexception-http2-tunnel branch July 26, 2023 20:59
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
None yet
Development

Successfully merging this pull request may close these issues.

WritePendingException over HTTP/2 tunnel
4 participants