Skip to content

Commit 8a765f9

Browse files
fix: add stalled stream protection config to SSO client (#1929)
Co-authored-by: Brandon Kiser <bskiser@amazon.com>
1 parent 972adf4 commit 8a765f9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/chat-cli/src/auth/builder_id.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ use tracing::{
4949
warn,
5050
};
5151

52+
use crate::api_client::clients::shared::stalled_stream_protection_config;
5253
use crate::auth::AuthError;
5354
use crate::auth::consts::*;
5455
use crate::auth::scope::is_scopes;
@@ -86,6 +87,7 @@ pub fn client(region: Region) -> Client {
8687
.region(region)
8788
.retry_config(RetryConfig::standard().with_max_attempts(3))
8889
.sleep_impl(SharedAsyncSleep::new(TokioSleep::new()))
90+
.stalled_stream_protection(stalled_stream_protection_config())
8991
.app_name(app_name())
9092
.build(),
9193
)

crates/fig_auth/src/builder_id.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ use aws_smithy_runtime_api::client::identity::{
4242
use aws_smithy_types::error::display::DisplayErrorContext;
4343
use aws_types::region::Region;
4444
use aws_types::request_id::RequestId;
45+
use aws_types::sdk_config::StalledStreamProtectionConfig;
4546
use fig_aws_common::app_name;
4647
use fig_telemetry_core::{
4748
Event,
@@ -101,6 +102,11 @@ pub(crate) fn client(region: Region) -> Client {
101102
.region(region)
102103
.retry_config(retry_config)
103104
.sleep_impl(SharedAsyncSleep::new(TokioSleep::new()))
105+
.stalled_stream_protection(
106+
StalledStreamProtectionConfig::enabled()
107+
.grace_period(std::time::Duration::from_secs(60))
108+
.build(),
109+
)
104110
.app_name(app_name())
105111
.build();
106112
Client::new(&sdk_config)

0 commit comments

Comments
 (0)