Skip to content

Commit

Permalink
Appease Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
landonxjames committed Jan 21, 2025
1 parent cfa7efd commit 3671652
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions aws/rust-runtime/aws-config/src/imds/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,16 +595,14 @@ impl ClassifyRetry for ImdsResponseRetryClassifier {
// This catch-all includes successful responses that fail to parse. These should not be retried.
_ => RetryAction::NoActionIndicated,
}
} else if self.retry_connect_timeouts {
RetryAction::server_error()
} else {
if self.retry_connect_timeouts {
RetryAction::server_error()
} else {
// This is the default behavior.
// Don't retry timeouts for IMDS, or else it will take ~30 seconds for the default
// credentials provider chain to fail to provide credentials.
// Also don't retry non-responses.
RetryAction::NoActionIndicated
}
// This is the default behavior.
// Don't retry timeouts for IMDS, or else it will take ~30 seconds for the default
// credentials provider chain to fail to provide credentials.
// Also don't retry non-responses.
RetryAction::NoActionIndicated
}
}
}
Expand Down

0 comments on commit 3671652

Please sign in to comment.