Skip to content

Commit e78da55

Browse files
Fix regression: Use connect_timeout and read_timeout again (#1822) (#1823)
1 parent 1b2b42d commit e78da55

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.next.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,9 @@ message = "The client Config now has getters for every value that it holds."
125125
references = ["smithy-rs#1747"]
126126
meta = { "breaking" = false, "tada" = false, "bug" = true }
127127
author = "kastolars"
128+
129+
[[aws-sdk-rust]]
130+
message = "Fix regression where `connect_timeout` and `read_timeout` fields are unused in the IMDS client"
131+
references = ["smithy-rs#1822"]
132+
meta = { "breaking" = false, "tada" = false, "bug" = true }
133+
author = "kevinpark1217"

aws/rust-runtime/aws-config/src/imds/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ impl Builder {
556556
pub async fn build(self) -> Result<Client, BuildError> {
557557
let config = self.config.unwrap_or_default();
558558
let timeout_config = TimeoutConfig::builder()
559-
.connect_timeout(DEFAULT_CONNECT_TIMEOUT)
560-
.read_timeout(DEFAULT_READ_TIMEOUT)
559+
.connect_timeout(self.connect_timeout.unwrap_or(DEFAULT_CONNECT_TIMEOUT))
560+
.read_timeout(self.read_timeout.unwrap_or(DEFAULT_READ_TIMEOUT))
561561
.build();
562562
let connector_settings = ConnectorSettings::from_timeout_config(&timeout_config);
563563
let connector = expect_connector(config.connector(&connector_settings));

0 commit comments

Comments
 (0)