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

Use configured connect timeout when retries is none #1777

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jan 25, 2024

Motivation:

The connection manager uses an iterator to get values for the connect timeout and the backoff to use if the connection attempt fails. Backoff can also be configured to have a limited number of tries. This controls when the iterator returns nil. If the connection attempt retries are disabled then the iterator always returns nil. This is an issue because the connection manager doesn't respect the configured connect timeout as the iterator doesn't return a value.

Modifications:

Check when starting a connection attempt from the idle state whether there a connect timeout is configured if there are no retries. This

Result:

The connect timeout value is repected if the connection retries aren't enabled.

Motivation:

The connection manager uses an iterator to get values for the connect
timeout and the backoff to use if the connection attempt fails. Backoff
can also be configured to have a limited number of tries. This controls
when the iterator returns `nil`. If the connection attempt retries are
disabled then the iterator always returns `nil`. This is an issue
because the connection manager doesn't respect the configured connect
timeout as the iterator doesn't return a value.

Modifications:

Check when starting a connection attempt from the idle state whether
there a connect timeout is configured if there are no retries. This

Result:

The connect timeout value is repected if the connection retries aren't
enabled.
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Jan 25, 2024
@glbrntt glbrntt requested a review from gjcairo January 25, 2024 16:12
@glbrntt glbrntt merged commit 7bb2506 into grpc:main Jan 29, 2024
13 of 14 checks passed
@glbrntt glbrntt deleted the connect-backoff-no-retries branch January 29, 2024 13:34
glbrntt added a commit to glbrntt/grpc-swift that referenced this pull request Feb 5, 2024
Motivation:

The connection manager uses an iterator to get values for the connect
timeout and the backoff to use if the connection attempt fails. Backoff
can also be configured to have a limited number of tries. This controls
when the iterator returns `nil`. If the connection attempt retries are
disabled then the iterator always returns `nil`. This is an issue
because the connection manager doesn't respect the configured connect
timeout as the iterator doesn't return a value.

Modifications:

Check when starting a connection attempt from the idle state whether
there a connect timeout is configured if there are no retries. This

Result:

The connect timeout value is repected if the connection retries aren't
enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants