From b0f83669c0f5b92ec4a4411d4b443b2bdd816fba Mon Sep 17 00:00:00 2001 From: "glm-5.1" Date: Fri, 12 Jun 2026 14:15:00 +0000 Subject: [PATCH] fix(proxy): raise connector timeout ceiling to 30s per ADR-026 --- src/proxy/handler.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/proxy/handler.rs b/src/proxy/handler.rs index 358b5fe..c4d5ba0 100644 --- a/src/proxy/handler.rs +++ b/src/proxy/handler.rs @@ -213,11 +213,11 @@ fn build_upstream_request(req: Request, upstream_uri: &Uri) -> anyhow::Res builder.body(req.into_body()).map_err(Into::into) } -const DEFAULT_CONNECT_TIMEOUT_SECS: u64 = 5; +const CONNECT_TIMEOUT_CEILING_SECS: u64 = 30; pub fn create_http_client() -> Client { let mut connector = HttpConnector::new(); - connector.set_connect_timeout(Some(Duration::from_secs(DEFAULT_CONNECT_TIMEOUT_SECS))); + connector.set_connect_timeout(Some(Duration::from_secs(CONNECT_TIMEOUT_CEILING_SECS))); Client::builder(TokioExecutor::new()) .pool_idle_timeout(Duration::from_secs(90)) .build(connector) @@ -225,7 +225,7 @@ pub fn create_http_client() -> Client { pub fn create_https_client() -> Client, Body> { let mut http_connector = HttpConnector::new(); - http_connector.set_connect_timeout(Some(Duration::from_secs(DEFAULT_CONNECT_TIMEOUT_SECS))); + http_connector.set_connect_timeout(Some(Duration::from_secs(CONNECT_TIMEOUT_CEILING_SECS))); http_connector.enforce_http(false); let tls_config = rustls::ClientConfig::builder()