Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Bound read stalls with a 30 second read timeout

Manav Rathi1979f3dc8306
diff --git a/rust/crates/core/src/http.rs b/rust/crates/core/src/http.rs
index 5fa71ff662..92a6f3891d 100644
--- a/rust/crates/core/src/http.rs
+++ b/rust/crates/core/src/http.rs
@@ -133,11 +133,13 @@ pub struct Http {
}
impl Http {
- /// Create a transport with a default connect timeout.
+ /// Create a transport with default connect and read timeouts.
pub fn new() -> Result<Self, Error> {
let builder = reqwest::Client::builder();
#[cfg(not(target_arch = "wasm32"))]
- let builder = builder.connect_timeout(Duration::from_secs(15));
+ let builder = builder
+ .connect_timeout(Duration::from_secs(15))
+ .read_timeout(Duration::from_secs(30));
Ok(Http {
client: builder.build()?,
})