mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
Add 5s timeout to LiveKit API requests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
de24b4b4e8
commit
be1dc01d9e
1 changed files with 5 additions and 2 deletions
|
@ -3,7 +3,7 @@ use anyhow::{anyhow, Result};
|
|||
use async_trait::async_trait;
|
||||
use prost::Message;
|
||||
use reqwest::header::CONTENT_TYPE;
|
||||
use std::{future::Future, sync::Arc};
|
||||
use std::{future::Future, sync::Arc, time::Duration};
|
||||
|
||||
#[async_trait]
|
||||
pub trait Client: Send + Sync {
|
||||
|
@ -29,7 +29,10 @@ impl LiveKitClient {
|
|||
}
|
||||
|
||||
Self {
|
||||
http: reqwest::Client::new(),
|
||||
http: reqwest::ClientBuilder::new()
|
||||
.timeout(Duration::from_secs(5))
|
||||
.build()
|
||||
.unwrap(),
|
||||
url: url.into(),
|
||||
key: key.into(),
|
||||
secret: secret.into(),
|
||||
|
|
Loading…
Reference in a new issue