Skip to content

Commit aa27abd

Browse files
committed
fix: add stalled stream protection config to SSO client
1 parent f7cf836 commit aa27abd

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
@@ -48,6 +48,7 @@ use tracing::{
4848
warn,
4949
};
5050

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

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)