Skip to content

Conversation

davidh44
Copy link
Contributor

Motivation and Context

#5355

Currently, when performing GET with ResponseTransformer.toInputStream() or AsyncResponseTransformer.toPublisher(), the HTTP connection will remain open until the stream/publisher is consumed or canceled. If not properly handled, resource leakage can occur and subsequent requests may time out.

Modifications

Add default timeout of 60 seconds for both ResponseInputStream and ResponsePublisher

Add method overloads for ResponseTransformer.toInputStream() and AsyncResponseTransformer.toPublisher() to take timeout arg of type Duration

To disable timeout (existing behavior), pass Duration.ZERO

Testing

Added unit and integ tests

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

@davidh44 davidh44 requested a review from a team as a code owner August 22, 2025 22:36
Copy link

@davidh44 davidh44 enabled auto-merge August 26, 2025 00:19
@davidh44 davidh44 added the api-surface-area-approved-by-team Indicate API surface area introduced by this PR has been approved by team label Aug 26, 2025
@davidh44 davidh44 added this pull request to the merge queue Aug 26, 2025
Merged via the queue into master with commit 43950cf Aug 26, 2025
40 of 41 checks passed
Copy link

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2025
@davidh44 davidh44 deleted the hdavidh/add-timeout-response-publisher-and-inputStream branch August 26, 2025 18:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-surface-area-approved-by-team Indicate API surface area introduced by this PR has been approved by team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants