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 #11259 - HTTP/2 connection not closed after idle timeout when TCP congested. #11267

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Jan 12, 2024

Now upon the second idle timeout, the connection is forcibly closed.
Fixed also similar problem in HTTP/3.

…CP congested.

Now upon the second idle timeout, the connection is forcibly closed.
Fixed also similar problem in HTTP/3.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet sbordet requested review from gregw and lorban January 12, 2024 09:56
@sbordet sbordet linked an issue Jan 12, 2024 that may be closed by this pull request
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this pull request Jan 12, 2024
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this pull request Jan 12, 2024
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
if (LOG.isDebugEnabled())
LOG.debug("Already closed, ignored idle timeout for {}", HTTP2Session.this);
// Writes may be TCP congested, so termination never happened.
flusher.abort(new TimeoutException());
Copy link
Contributor

Choose a reason for hiding this comment

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

All branches of the switch above result in a new TimeoutException, so just do it once before the switch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uhm, no. The TimeoutException is only allocated if terminate=true which only happens if the session is already in CLOSED state.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is also allocated in locally and remotely closed cases. At least give it the same message as the others.

lorban
lorban previously approved these changes Jan 12, 2024
@sbordet sbordet requested a review from gregw January 12, 2024 15:01
@joakime joakime added this to the 12.0.x milestone Jan 12, 2024
@joakime joakime added the Bug For general bugs on Jetty side label Jan 12, 2024
if (LOG.isDebugEnabled())
LOG.debug("Already closed, ignored idle timeout for {}", HTTP2Session.this);
// Writes may be TCP congested, so termination never happened.
flusher.abort(new TimeoutException());
Copy link
Contributor

Choose a reason for hiding this comment

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

It is also allocated in locally and remotely closed cases. At least give it the same message as the others.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this pull request Jan 15, 2024
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet sbordet merged commit 0839a20 into jetty-12.0.x Jan 15, 2024
8 checks passed
@sbordet sbordet deleted the fix/jetty-12/11259/idle-timeout-congested branch January 15, 2024 16:29
sbordet added a commit that referenced this pull request Jan 15, 2024
…CP congested. (#11268)

* Backport of #11267.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
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 connection not closed after idle timeout when TCP congested
4 participants