Use configured connect timeout when retries is none #1777
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 returnsnil
. 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.