From bfc32cc69241b688e7250a93f7c84d375f368874 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 30 Aug 2024 16:30:28 +0200 Subject: [PATCH] net/aws: fix spurious dispatch failures Since https://github.com/awslabs/aws-sdk-rust/discussions/956, the AWS SDK errors out HTTP streams that do not transfer data for more than 5 seconds. This probably should be an opt-in bhevior as it clearly not generically useful, but as it is we need to opt out. Part-of: --- net/aws/src/transcriber/imp.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/aws/src/transcriber/imp.rs b/net/aws/src/transcriber/imp.rs index 656217c8..aa2ea31a 100644 --- a/net/aws/src/transcriber/imp.rs +++ b/net/aws/src/transcriber/imp.rs @@ -21,6 +21,7 @@ use gst::subclass::prelude::*; use gst::{glib, prelude::*}; +use aws_sdk_s3::config::StalledStreamProtectionConfig; use aws_sdk_transcribestreaming as aws_transcribe; use futures::channel::mpsc; @@ -578,6 +579,9 @@ impl Transcriber { .or_else(DEFAULT_TRANSCRIBER_REGION), ); + let config_loader = + config_loader.stalled_stream_protection(StalledStreamProtectionConfig::disabled()); + let config = futures::executor::block_on(config_loader.load()); gst::debug!(CAT, imp = self, "Using region {}", config.region().unwrap());