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

fix: http/2 stream leaks #5775

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix: http/2 stream leaks #5775

wants to merge 2 commits into from

Conversation

ed382
Copy link
Contributor

@ed382 ed382 commented Aug 21, 2024

Pull request description

When response bodies are not properly an HTTP/2 client can leak streams which can eventually lead to a failure case (i.e. stream error: stream ID 1; INTERNAL_ERROR) related HTTP/2 flow-control. Here is a more thorough description of the issue: googleapis/google-cloud-go#7440 (comment)

This fixes cases where the response body for an HTTP request was not closed, and also refactors some of the code to make it easier to see when the stream has been closed.

In a couple of cases, it relied on the SendStream method from the fiber package to close the stream, but I could not find anywhere in their docs or code base where it actually closed the stream.

Checklist (choose whats happened)

  • breaking change! (describe)
  • tested locally
  • tested on cluster
  • added new dependencies
  • updated the docs
  • added a test

Breaking changes

Changes

Fixes

@ed382 ed382 added the bug 🐛 Something is not working as should be label Aug 21, 2024
@ed382 ed382 self-assigned this Aug 21, 2024
@ed382 ed382 marked this pull request as ready for review August 22, 2024 09:39
@ed382 ed382 requested a review from a team as a code owner August 22, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something is not working as should be
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants