Skip to content

Conversation

@alzimmermsft
Copy link
Member

Description

When proxying adds the configured CONNECT timeout to the proxy connection attempt.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@alzimmermsft alzimmermsft self-assigned this Dec 12, 2025
Copilot AI review requested due to automatic review settings December 12, 2025 14:37
@github-actions github-actions bot added the Azure.Core azure-core label Dec 12, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances proxy connection handling by applying the configured CONNECT timeout to proxy connection attempts in the Netty HTTP client. Previously, the connect timeout was only applied to the main HTTP client connection but not to the proxy CONNECT operation itself.

Key Changes:

  • Extracted connectTimeoutMillis calculation to a reusable variable to avoid code duplication
  • Applied the connect timeout to authenticated proxy handlers (custom HttpProxyHandler)
  • Applied the connect timeout to non-authenticated proxies via Reactor Netty's connectTimeoutMillis() method

Copy link
Member

@samvaity samvaity left a comment

Choose a reason for hiding this comment

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

lgtm overall

nettyHttpClient
= nettyHttpClient.proxy(proxy -> proxy.type(toReactorNettyProxyType(buildProxyOptions.getType()))
.socketAddress(buildProxyOptions.getAddress())
.connectTimeoutMillis(connectTimeoutMillis)
Copy link
Member

Choose a reason for hiding this comment

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

are there any testing changes needed to validate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core azure-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants