diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 01:11:29 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 01:11:29 +0100 |
| commit | 81c19a8a4f1c99f721d4c65fbcddcec6474b752b (patch) | |
| tree | 3b2320a40725420ef18669a15b1aa41e637e86c6 /src/voice/mod.rs | |
| parent | tts: bound the audio cache and request length (diff) | |
| download | senator-sperma-81c19a8a4f1c99f721d4c65fbcddcec6474b752b.tar.gz senator-sperma-81c19a8a4f1c99f721d4c65fbcddcec6474b752b.zip | |
http: add connect and request timeouts
Diffstat (limited to 'src/voice/mod.rs')
| -rw-r--r-- | src/voice/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/voice/mod.rs b/src/voice/mod.rs index bbb73a0..a6baa64 100644 --- a/src/voice/mod.rs +++ b/src/voice/mod.rs | |||
| @@ -275,6 +275,7 @@ pub async fn ytdlp_download(url: &str) -> Result<Vec<u8>> { | |||
| 275 | pub async fn download_url(client: &reqwest::Client, url: &str) -> Result<Vec<u8>> { | 275 | pub async fn download_url(client: &reqwest::Client, url: &str) -> Result<Vec<u8>> { |
| 276 | let resp = client | 276 | let resp = client |
| 277 | .get(url) | 277 | .get(url) |
| 278 | .timeout(Duration::from_secs(300)) | ||
| 278 | .send() | 279 | .send() |
| 279 | .await | 280 | .await |
| 280 | .map_err(|e| Error::Custom(format!("HTTP GET failed for {}: {e}", redact_url(url))))?; | 281 | .map_err(|e| Error::Custom(format!("HTTP GET failed for {}: {e}", redact_url(url))))?; |
