Skip to content

Commit

Permalink
Fix regression: Use connect_timeout and read_timeout again (#1822) (
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpark1217 authored Oct 7, 2022
1 parent 1b2b42d commit e78da55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,9 @@ message = "The client Config now has getters for every value that it holds."
references = ["smithy-rs#1747"]
meta = { "breaking" = false, "tada" = false, "bug" = true }
author = "kastolars"

[[aws-sdk-rust]]
message = "Fix regression where `connect_timeout` and `read_timeout` fields are unused in the IMDS client"
references = ["smithy-rs#1822"]
meta = { "breaking" = false, "tada" = false, "bug" = true }
author = "kevinpark1217"
4 changes: 2 additions & 2 deletions aws/rust-runtime/aws-config/src/imds/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ impl Builder {
pub async fn build(self) -> Result<Client, BuildError> {
let config = self.config.unwrap_or_default();
let timeout_config = TimeoutConfig::builder()
.connect_timeout(DEFAULT_CONNECT_TIMEOUT)
.read_timeout(DEFAULT_READ_TIMEOUT)
.connect_timeout(self.connect_timeout.unwrap_or(DEFAULT_CONNECT_TIMEOUT))
.read_timeout(self.read_timeout.unwrap_or(DEFAULT_READ_TIMEOUT))
.build();
let connector_settings = ConnectorSettings::from_timeout_config(&timeout_config);
let connector = expect_connector(config.connector(&connector_settings));
Expand Down

0 comments on commit e78da55

Please sign in to comment.