[V3] Add the ConnectTimeout property on the service client config for the … #3820
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.
Description
In the .NET 8 target we have access to the ConnectTimeout. This PR exposes the ability to set the
ConnectTimeout
on the service client.In the V4 version of this AWSSDK.Extensions.NETCore.Setup was also updated but in this V3 PR it was not. That is because in V3 extends from the
ClientConfig
so it automatically inherits the properties. In V4 we removed the inheritance so I need to copy theConnectTimeout
to AWSSDK.Extensions.NETCore.Setup and add the logic to copy the setting the service client config.Motivation and Context
This will help in scenario the SDK is trying to connect to a bad host and gets stuck trying to create the connection for a long period. If the user sets the connect timeout the
SendAsync
will timeout after the connect timeout has expired and since it is an IO exception the SDK will retry possibly to a different host.Testing
Dry run successful: DRY_RUN-394333cd-113a-4bbe-a5f0-a13ba692b64c
Manually confirmed by setting a low connect timeout that the SDK does do a retry when the connect timeout happens.